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
@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:d4c6d513f7dd0f9ec30c
Created September 28, 2015 21:26 — forked from AdamWhittingham/gist:d5863d30d2ac492840d1
Ubuntu Hubot Upstart Config
# hubot
description "Hubot Slack bot"
author "Adam Whittingham <emailaddress>"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/opt/hubot/kaytoo/'
@emerleite
emerleite / tmux-copy-mode-osx.md
Last active September 8, 2015 19:16 — forked from brendanhay/tmux-copy-mode-osx.md
Tmux, copy-mode, and OSX shenanigans.

Copy, with line wrapping!

If you've been trying to copy/paste text from a multi-pane tmux session with the mouse, you've probably been pretty pissed at the blissful ignorance a terminal application has of the rodent in your hand.

The alternative, which is quote-unqoute native copy/pasting using copy-mode takes a bit to get used to. So this is one solution for copying and pasting lines from a session with correct line wrapping behaviour, albeit keyboard only.

Disclaimer

Since copy-mode has similar concepts of marks, regions, and temp buffers to Emacs .. you'll probably find it straight forward if you're familar with Emacsen. For people using vi-mode in tmux, the same still applies but obviously the default key bindings will differ alot from what I show below.