This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Fui num dia do Grupo de Erlang, acabamos fazendo um dojo. | |
Créditos da solução - Seu Carlos Flores =) | |
""" | |
# versão 1 | |
arabicos = [1000, 900,500,400,100,90,50,40,10,9,5,4,1] | |
romanos = ['M','CM','D','CD','C','XC','L','XL','X','IX','V','IV', 'I'] | |
def converter(num): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Sabe tudo" | |
Fala o tempo todo, sendo 90% descartável. | |
Faz questão de corrigir os outros em tópicos não relacionados | |
"Showman" | |
Chegou agora no projeto, não tem a menor noção do que está falando. Entretanto, consegue | |
dominar a reunião com sua eloquência | |
"Zumbi" | |
Não fala. Nunca. Só olha de um lado para o outro, rezando para que termine logo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Você começou hoje, espero que já saiba lutar bem com um sabre de luz, padawan. Como primeiro desafio, terá que derrotar aquele Sith Lord ali. | |
- Mas eu nunca lutei com um sith! O que eu faço? | |
- Se vira. Dá seus pulos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
for f in `find . -name *.rb` | |
do | |
sed -n '1p;' $f | grep -E '^#(coding| coding|-\*-| -\*-)' > /dev/null | |
if [ $? != 0 ] | |
then | |
sed -i '1i #coding: utf-8' $f | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#put this in your .bashrc | |
alias wtc="curl http://whatthecommit.com/index.txt" | |
#Usage | |
git commit -m"`wtc`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Better: | |
if key not in d: d[key] = [] | |
# Even Better | |
d.get(key, []) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.env['RAW_POST_DATA'] = "{'some': 'json'}" | |
post :sua_action, :format => "json" |