Skip to content

Instantly share code, notes, and snippets.

View emerleite's full-sized avatar

Emerson Macedo emerleite

View GitHub Profile
@emerleite
emerleite / up-and-running-with-edeliver-on-do.md
Created July 28, 2017 18:10 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
@emerleite
emerleite / podcasts.md
Created February 10, 2017 21:37 — forked from plentz/podcasts.md
podcasts
  • hipsters.tech
  • nerdcast
  • freakonomics radio
  • software engineering daily
  • under the radar (marco arment & david smith)
  • 99% invisible
  • recode decode (?)
@emerleite
emerleite / observer.md
Created January 13, 2017 20:54 — forked from pnc/observer.md
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
@emerleite
emerleite / latency.markdown
Created October 10, 2016 00:18 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@emerleite
emerleite / install_elixir.md
Created April 10, 2016 22:13 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then kerl and exenv are your best friends.

@emerleite
emerleite / Dockerfile
Created April 8, 2016 17:59 — forked from plamb/Dockerfile
docker exrm (many months old, might be way outdated)
# This image is designed as a base image to use in creating exrm releases. It
# includes quite a few things that you would not need for just a pure runtime
# but is also suitable to use as a base for a phoenix app (you may need to add
# npm for handling the static assets)
FROM debian:jessie
MAINTAINER Someone <someone@somewhere.com>
ENV DEBIAN_FRONTEND noninteractive

Keybase proof

I hereby claim:

  • I am emerleite on github.
  • I am emerleite (https://keybase.io/emerleite) on keybase.
  • I have a public key ASBmul_42V3E0ay9rOO_SqRXBUoafhGG1F-MZS7meN1rKAo

To claim this, I am signing this object:

@emerleite
emerleite / os-segredos-da-mente-milionaria.txt
Created November 10, 2015 18:13 — forked from gustavohenrique/os-segredos-da-mente-milionaria.txt
Resumo do livro Os Segredos da Mente Milionária
Os segredos da mente milionária (João Augusto Rodrigues)
Ou você controla o seu dinheiro ou ele controlará você. - O hábito de administrar as finanças é mais importante do que a quantidade de dinheiro que você tem. - A sua motivação para enriquecer é crucial: se ela possui uma raiz negativa, como o medo, a raiva ou a necessidade de provar algo a si mesmo, o dinheiro nunca lhe trará felicidade. - O segredo do sucesso não é tentar evitar os problemas nem se livrar deles, mas crescer pessoalmente para se tornar maior do que qualquer adversidade. - Os gastos excessivos têm pouco a ver com o que você está comprando e tudo a ver com a falta de satisfação na sua vida.
A resposta, segundo o autor, está no modelo pessoal de dinheiro que todos nós trazemos gravado no subconsciente.
Acima de tudo, sentia medo. Temia fracassar, ou pior, ter sucesso e acabar perdendo tudo. Nesse caso, eu seria realmente um panaca. Pior, destruiria a única coisa que soprava a meu favor: a lenda de que eu tinha um grande potencial. E se
@emerleite
emerleite / ladder.md
Created November 3, 2015 00:40 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@emerleite
emerleite / gist:922a6ea4fb9e9954f444
Last active October 16, 2015 00:18
Sidekiq web ui fix
require 'sidekiq/web'
Sidekiq::Web.use(Rack::Session::Cookie, secret: ENV.fetch('SIDEKIQ_SESSION_SECRET', 'value'))
Sidekiq::Web.instance_eval { @middleware.reverse! }
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
username == ENV.fetch("SIDEKIQ_USERNAME", "u") && password == ENV.fetch("SIDEKIQ_PASSWORD", "p")
end if Rails.env.production?
mount Sidekiq::Web => '/sidekiq'