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
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
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
385002 = 38500-200 | |
38500201 = 38500-201 | |
2950 = 00295-000 | |
22923 = 02292-300 | |
125 = 00012-500 |
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
# colocar dentro do ~/.bash_profile | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
# rvm |
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
# | |
# Backup of mysql, files, whatever... | |
# | |
# example 1 | |
backup.start do | |
new :mysql => {:host => '0.0.0.0', :user => 'root', :password => 'mypass'} | |
new :mysql => {:host => '0.0.0.0', :user => 'root', :password => 'mypass'} | |
new :archive => {:host => '0.0.0.0', :user => 'root', :password => 'mypass', :remote_file => ''} | |
end |
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
# Returns all posts. | |
# http://www.delicious.com/help/api#posts_all | |
curl https://username:password@api.del.icio.us/v1/posts/all > bookmarks.xml |
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
describe 'Person' | |
before_each | |
person = new Person('Lopes') | |
end | |
describe '.getName()' | |
it 'deve retornar o nome' | |
person.getName().should.be 'Lopes' | |
end |
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
" Trocar de abas dentro do gvim usando Alt+1, Alt+2... | |
" Editar o arquivo ~/.vimrc e inserir os dados abaixo | |
"tabs | |
map <D-1> 1gt | |
map <D-2> 2gt | |
map <D-3> 3gt | |
map <D-4> 4gt | |
map <D-5> 5gt | |
map <D-6> 6gt |
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
export GREP_OPTIONS="--color=auto" | |
export GREP_COLOR="4;33" | |
export CLICOLOR="auto" | |
source ~/.git-completion.sh | |
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home" | |
export SCALA_HOME="/usr/local/scala-2.7.7.final" | |
export JAVA="$JAVA_HOME/bin/java" | |
export SCALA="$SCALA_HOME/bin/scala" | |
export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:/usr/local/mysql/bin:$PATH" |
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
# model Curso | |
# app/model/course.rb | |
class Course < ActiveRecord::Base | |
has_many :payments, :order => "id" | |
accepts_nested_attributes_for :payments, :allow_destroy => true, | |
:reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } | |
end |
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
# remove arquivos desnecessários | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm README" | |
run "rm doc/README_FOR_APP" | |
# gera um controller home e action index | |
generate :controller, "home", "index" | |
# define a rota root |