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
$ script/console | |
Loading development environment (Rails 2.3.8) | |
ruby-1.8.7-p299 > country = Country.create :name => "Brasil" | |
=> #<Country id: 3, name: "Brasil", created_at: "2010-07-23 15:37:58", updated_at: "2010-07-23 15:37:58"> | |
ruby-1.8.7-p299 > state = State.create :name => "RJ" | |
=> #<State id: 2, name: "RJ", country_id: nil, created_at: "2010-07-23 15:38:15", updated_at: "2010-07-23 15:38:15"> | |
ruby-1.8.7-p299 > country.states << state | |
=> [#<State id: 2, name: "RJ", country_id: 3, created_at: "2010-07-23 15:38:15", updated_at: "2010-07-23 15:38:28">] |
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
/* Syntax Highlighter */ | |
.dp-highlighter | |
{ | |
font-family: "Menlo", "Monaco", "BitStream Vera Sans Mono", "Consolas", "Courier New", Courier, mono, serif; | |
font-size: 12px; | |
background-color: #0A263F; | |
width: 99%; | |
overflow: auto; | |
margin: 18px 0 18px 0 !important; |
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
/* Stylesheet generated from TextMate theme | |
* Loaded by rafael.xlii.com.br - production mode | |
* | |
* Sunburst | |
* (À) Soryu, 2005 | |
* | |
*/ | |
/* Mostly to improve view within the TextMate HTML viewer */ | |
body { |
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
# allow you to start typing a command and use the up/down arrow to auto complete from commands in your history | |
"\e[B": history-search-forward | |
"\e[A": history-search-backward | |
# Next thing is to fix an input problem (from iTerm FAQ) | |
set meta-flag on | |
set input-meta on | |
set output-meta on | |
set convert-meta off |
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
" vimrc por rafaeldx7 <[email protected]> | |
" Desliga os barulhos que eu acho muito irritantes | |
set visualbell t_vb= | |
" Status line | |
set laststatus=2 | |
set statusline= | |
set statusline+=%-3.3n\ " buffer number | |
set statusline+=%f\ " filename |
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
# Just run: | |
# bash < <(curl -Ls https://raw.github.com/gist/1083894) | |
# Update and cleanup RVM | |
rvm get head | |
rvm reload | |
rvm cleanup all | |
# Ruby 1.9 Fast require: | |
# https://gist.github.com/1008945 |
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
### UPDATE: ruby-debuy19 is no longer maintained, use https://github.com/cldwalker/debugger | |
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1333785) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
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
VBoxManage createvm --name openbsd --ostype OpenBSD_64 | |
VBoxManage registervm /Users/rafaeldx7/VirtualBox\ VMs/openbsd/openbsd.vbox | |
VBoxManage createhd --filename /tmp/openbsd.vdi --size 4096 | |
VBoxManage storageattach openbsd --storagectl disk --port 1 --type hdd --medium /tmp/openbsd.vdi |
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
VBoxManage modifyvm openbsd --natpf1 "guestssh,tcp,,2222,,22" # permite conectar ssh | |
pkg add bash unzip gmake-3.82 qt4-4.7.3p0 ruby-1.9.2.290 libxml-2.7.8p2 libxslt-1.1.26p2 mysql-server-5.1.54p9 gcc-4.2.4p4v0 | |
ln -sf /usr/local/bin/python2.7 /usr/local/bin/python | |
ln -sf /usr/local/bin/python2.7-2to3 /usr/local/bin/2to3 | |
ln -sf /usr/local/bin/python2.7-config /usr/local/bin/python-config | |
ln -sf /usr/local/bin/pydoc2.7 /usr/local/bin/pydoc | |
ln -sf /usr/local/bin/ruby19 /usr/local/bin/ruby |
OlderNewer