Skip to content

Instantly share code, notes, and snippets.

View emerleite's full-sized avatar

Emerson Macedo emerleite

View GitHub Profile
@emerleite
emerleite / udp_server.exs
Created April 26, 2021 13:16 — forked from joshnuss/udp_server.exs
Fault tolerant UDP Server in Elixir
# to run:
# > elixir --no-halt udp_server.exs
# to test:
# > echo "hello world" | nc -u -w0 localhost:2052
# > echo "quit" | nc -u -w0 localhost:2052
# Let's call our module "UDPServer"
defmodule UDPServer do
# Our module is going to use the DSL (Domain Specific Language) for Gen(eric) Servers
use GenServer
@emerleite
emerleite / emulator-install-using-avdmanager.md
Created March 28, 2021 22:14 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@emerleite
emerleite / gist:82b395e365d910f79c3b613fdb693656
Last active January 20, 2021 21:35
Kent Beck - Paint Drip People

Kent Beck - Paint Drip People

Keith Adams worked on kernels at VM Ware. Then virtual machines. Then search performance at Facebook. Then the HHVM implementation of PHP. Then machine learning. Now he’s Chief Architect at Slack. In between he worked on hundreds of little projects that lasted hours or days or weeks. Keith is a Paint Drip Person.

I was a big fan of the T model of skills, introduced by David Guest in 1991: know about a lot of things, be really good at one. The more I taught it, the more unhappy I got with the metaphor:

  • Skilled people are good at several things.
  • Skilled people’s interests develop over time.
  • Skilled people don’t plan their next focus area. Sometimes it seems completely unrelated to their previous focus area.
@emerleite
emerleite / tail_call_optimized.py
Created July 13, 2020 18:25 — forked from porcow/tail_call_optimized.py
Tail Call Optimization Decorator (Python recipe)
## {{{ http://code.activestate.com/recipes/474088/ (r1)
#!/usr/bin/env python2.4
# This program shows off a python decorator(
# which implements tail call optimization. It
# does this by throwing an exception if it is
# it's own grandparent, and catching such
# exceptions to recall the stack.
import sys
@emerleite
emerleite / dicas.md
Created March 22, 2020 21:31 — forked from dmvieira/dicas.md
Dicas para entrar na área de dados

Como entrar na Área de Dados

Base

Então, vamos lá... Como material inicial para orientação temos o guia datascience.pizza... Se você prefere Podcast pode olhar o Pizza de Dados e o Data Hackers. Querendo um curso presencial, os únicos que indico são do Data Bootcamp que dou aula: https://databootcamp.com.br ... Para curso online existem vários no Coursera, Udemy, etc... Tem em português na Alura. Sobre o DataScienceAcademy eu não gosto muito e nem indico por várias questões.

Social

Você já tem Telegram? Se não, é muito bom entrar e olhar nos seguintes grupos que eu confio para saber das novidades e trocar uma ideia:

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

Título

s/Serviço TCP de 15 anos/Serviço HTTP em Elixir/g - Backend de anúncios da OLX

Abstract

Nessa apresentação, você vai conhecer os desafios que tivemos na OLX para substituir um serviço TCP de mais de 15 anos, cheio de memory leaks com um database legado, gigante e de modelagem complexa por um serviço Elixir com Banco de dados novo e sem nenhuma interrupção do serviço ou um Big Bang.

Informações complementares / Further details

É uma apresentação de uma arquitetura e detalhes de codificação/implementação muito interessantes. O famoso trocar o pneu do carro com o carro andando, sem perder velocidade, sem tremer o volante e sem freadas bruscas :) Problemas de encoding do banco velho, endpoint antigo confuso, cheio de parâmetros que não se sabia pra que servia, functions do postgres confusas, dentre outros desafios como usar 2 ECTOS, Querys usando Schema e Queries diretas chamando functions, etc. Além de uma arquitetura de CQRS. Em fim, imperdível :p

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@emerleite
emerleite / decode.txt
Created November 12, 2018 17:53 — forked from michalmuskala/decode.txt
Jason benches
Operating System: macOS"
CPU Information: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Number of Available Cores: 8
Available memory: 16 GB
Elixir 1.7.0-dev
Erlang 21.0
Benchmark suite executing with the following configuration:
warmup: 5 s
time: 30 s