Skip to content

Instantly share code, notes, and snippets.

View kdiogenes's full-sized avatar
🐝

Kadu Diógenes kdiogenes

🐝
View GitHub Profile
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso. Realize seu login por favor."
send_instructions: "Dentro de minutos você receberá um e-mail com instruções para confirmar a sua conta."
send_paranoid_instructions: "Caso seu e-mail exista em nossa base, você receberá um e-mail em poucos minutos com instruções sobre como confirmar sua conta."
failure:
already_authenticated: "Você já está logado."
inactive: "A sua conta não foi ativada ainda."
invalid: "E-mail ou senha inválidos."
@kdiogenes
kdiogenes / cleanup-docker.sh
Last active November 21, 2016 11:41 — forked from mlebkowski/cleanup-docker.sh
docker: cleanup docker disk space https://lebkowski.name/docker-volumes/
#!/bin/bash
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
docker volume ls -qf dangling=true | xargs -r docker volume rm
@kdiogenes
kdiogenes / slides.md
Created November 23, 2017 12:19 — forked from shadowmaru/slides.md
Palestras da RubyConf BR 2017
@kdiogenes
kdiogenes / scale-out-phoenix-with-websocket.md
Created June 16, 2019 20:56 — forked from Aetherus/scale-out-phoenix-with-websocket.md
How to scale out a Phoenix application with websocket

How to scale out a Phoenix application with websocket

Foreword

It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.

Resources

MiniGPT client v1.0

#!/usr/bin/env ruby
# frozen_string_literal: true
#
# MiniGPT client v1.0
#
# gem install --user-install ruby-openai
#
@kdiogenes
kdiogenes / decrypt_cookie.rb
Created May 3, 2024 19:36 — forked from goropikari/decrypt_cookie.rb
Decrypt a Rails 5 session cookie