Skip to content

Instantly share code, notes, and snippets.

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

Lindolfo Rodrigues lorn

🏠
Working from home
View GitHub Profile
View gist:d64c7f112a54e325e26e543c22e86152
Host bitbucket.org
HostName altssh.bitbucket.org
Port 443
Host github.com
HostName ssh.github.com
Port 443
Host gitlab.com
HostName altssh.gitlab.com
@lorn
lorn / docker-compose.yml
Created August 5, 2016 15:05
Docker compose for graylog2 tests, i'm putting here because of the udp stuff 👽
View docker-compose.yml
some-mongo:
image: "mongo:3"
some-elasticsearch:
image: "elasticsearch:2"
command: "elasticsearch -Des.cluster.name='graylog'"
graylog:
image: graylog2/server:2.0.1-1
environment:
GRAYLOG_PASSWORD_SECRET: somepasswordpepper
GRAYLOG_ROOT_PASSWORD_SHA2: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
View repl-shell.clj
; CIDER 0.10.0snapshot (package: 20150824.244) (Java 1.8.0_60, Clojure 1.7.0, nREPL 0.2.10)
user> (StringBuilder "Sam")
RuntimeException Expecting var, but StringBuilder is mapped to class java.lang.StringBuilder clojure.lang.Util.runtimeException (Util.java:221)
user> (StringBuilder. "Sam")
#object[java.lang.StringBuilder 0x3711d177 "Sam"]
user> ["mixed" 4 "content"]
[""]
user> ["mixed" 4]
["mixed" 4]
user>
View asyncfactory.py
from multiprocessing import Pool
from time import sleep
from random import randint
import os
class AsyncFactory:
def __init__(self, num_procs,func, cb_func):
self.func = func
self.cb_func = cb_func
self.pool = Pool(processes=num_procs)
@lorn
lorn / links.md
Last active August 29, 2015 14:20
Marvin talk
View links.md
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@lorn
lorn / vimtips.md
Last active August 29, 2015 14:04
vim tips
View vimtips.md

janelas e buffers

:sp filename for a horizontal split

:vsp filename or :vs filename for a vertical split

Edições simples

@lorn
lorn / keybase.md
Last active August 29, 2015 13:57
View keybase.md

Keybase proof

I hereby claim:

  • I am lorn on github.
  • I am lorn (https://keybase.io/lorn) on keybase.
  • I have a public key whose fingerprint is 8B30 AF6F 033C C22C FBA9 BEAC 216F C29D 5DF9 5903

To claim this, I am signing this object:

View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@lorn
lorn / artigo.pod
Last active December 30, 2015 23:59
View artigo.pod

Uma arquitetura de alta disponibilidade usando Starman

Continuando a introdução dada pelo nosso amigo que vence guerras, falarei um pouco mais sobre o Starman e, como ele, não falarei sobre PSGI/Plack porque esses assuntos já foram muito bem explorados em outros e equinocios.

Essa arquitetura é baseada na arquitetura que o Github usa/usava que eles explicam nesse post eles falam sobre como eles utilizam o Unicorn, o Starman foi baseado nesse cara o Miyagawa inclusive usou o nome Unicorn como "inspiração" para o nome Starman: