Skip to content

Instantly share code, notes, and snippets.

View robertov8's full-sized avatar
🏠
Working from home

Roberto Ribeiro robertov8

🏠
Working from home
View GitHub Profile

Gerando UUID customizados no Postgresql

Essas funções foram inspiradas nessas aqui e se mantiveram dentro da RFC 4122.

Estrutura do UUIDv8 Customizado

Esta versão customizada do UUIDv8, projetada para criar identificadores únicos, ordenáveis por tempo com precisão de microsegundos e que também carregam um número sequêncial de 64 bits. A estrutura de 128 bits é dividida da seguinte forma:

| 48 bits (Timestamp em Milissegundos) | 4 bits (Versão) | 12 bits (Custom B) | 2 bits (Variante) | 62 bits (Custom C) |
@joelpaulkoch
joelpaulkoch / rag_time.exs
Last active September 16, 2025 16:46
A RAG for Elixir in Elixir
Mix.install(
[
{:phoenix_playground, "~> 0.1.6"},
{:phoenix, "~> 1.7.14"},
{:phoenix_live_view, "~> 1.0.0-rc.1"},
{:chroma, "~> 0.1.3"},
{:text_chunker, "~> 0.3.1"},
{:nx, "~> 0.9.0"},
{:exla, "~> 0.9.1"},
{:axon, "~> 0.7.0"},
@robertov8
robertov8 / README.md
Last active January 10, 2024 22:55
Configuration wxWidgets on Mac | Erlang 25 | Elixir 1.15

Configuration wxWidgets on Mac | Erlang 25 | Elixir 1.15

build wxwidgets

git clone https://github.com/wxWidgets/wxWidgets.git

cd wxWidgets

git checkout v3.2.4
@erikkinding
erikkinding / kafka-local-docker-compose.yaml
Last active November 3, 2025 16:39
Docker compose for local Kafka setup with kafka-ui
# This setup allows you to both connect from within the docker-compose context as well as from services running on your local
# machine but not as part of the docker-compose setup. Any client connecting to the broker from the outside can connect to
# localhost:9092 while services running as part of the docker-compose connect to broker:9093.
#
# To access kafka-ui: http://localhost:7777
#
# I hope this helps someone out there! :)
version: '3'
networks:
@davidteren
davidteren / nerd_fonts.md
Last active December 4, 2025 07:16
Install Nerd Fonts via Homebrew [updated & fixed]
@andrebrait
andrebrait / keychron_linux.md
Last active December 8, 2025 08:31
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

API de Banking

O sistema deve oferecer a possibilidade de usuários realizarem transações financeiras como saque e transferencia entre contas.

Um usuário pode se cadastrar e ao completar o cadastro ele recebe R$ 1000,00.

Com isso ele pode transferir dinheiro para outras contas e pode sacar dinheiro. O saque do dinheiro simplesmente manda um email para o usuário informando sobre o saque e reduz o seu saldo (o envio de email não precisa acontecer de fato, pode ser apenas logado e colocado como "placeholder" para envio de email de fato).

Nenhuma conta pode ficar com saldo negativo.

@dadhi
dadhi / GetMaterializedViewSize.sql
Last active June 7, 2024 06:31
Find disk size of Postgres materialized view
/*
https://dba.stackexchange.com/questions/96534/postgres-check-disk-space-taken-by-materialized-view?newreg=6b1d58604fce4a1fbe3033ddbb52d7ca
relkind:
r = ordinary table,
i = index,
S = sequence,
v = view,
m = materialized view,
c = composite type,
@dvdbng
dvdbng / vim-heroku.sh
Last active October 16, 2024 17:15
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@folt
folt / gist:a98e9368dbe1dcbfce7198c16b862c92
Last active December 9, 2025 04:49
Balsamiq Mockups 3 crack
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!