⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
s = State.create([{ abbreviation: 'SP', name: 'São Paulo'}, | |
{ s.cities.create( name: 'Adamantina' )}, | |
{ s.cities.create( name: 'Adolfo' )}, | |
{ s.cities.create( name: 'Aguaí' )}, | |
{ s.cities.create( name: 'Águas da Prata' )}, | |
{ s.cities.create( name: 'Águas de Lindóia' )}, | |
{ s.cities.create( name: 'Águas de Santa Bárbara' )}, | |
{ s.cities.create( name: 'Águas de São Pedro' )}, | |
{ s.cities.create( name: 'Agudos' )}, | |
{ s.cities.create( name: 'Alambari' )}, |
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
p = Post.create(title: "test ", comment: Comment.new(name: "fabiano leite")) |
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
## Rails 3.2.0 (January 20, 2012) ## | |
* Upgrade mail version to 2.4.0 *ML* | |
* Remove Old ActionMailer API *Josh Kalderimis* |
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
"pt-BR": | |
errors: | |
messages: | |
not_found: "não encontrado" | |
already_confirmed: "já foi confirmado" | |
not_locked: "não foi bloqueado" | |
not_saved: | |
one: '1 erro impediu que %{model} fosse gravado:' | |
other: '%{count} erros impediram que %{model} fosse gravado:' |
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
require 'capistrano/ext/multistage' | |
set :application, "minha_app" | |
set :repository, "meu_repositorio" | |
set :scm, :git | |
set :use_sudo, false | |
set :ssh_options, { :forward_agent => true } |
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 PS1='\[\033[38m\]\u\[\033[32m\] \w \[\033[1;33m\]`~/.rvm/bin/rvm-prompt i v | |
`\[\033[0;31m\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ / | |
`\[\033[37m\]$\[\033[00m\] ' |
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
{ | |
"auto_completecommiton_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/colour-schemes/Monokai Soda.tmTheme", | |
"draw_minimap_border": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.log", |
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
Navigation: | |
cmd-p Goto Anything ('@' for functions, ':' for line number) | |
cmd-r Function finder | |
ctl-g Goto line number | |
cmd-sft-p Command palette | |
cmd-sft-f Find in Files | |
cmd-opt-r Toggle regex when finding | |
cmd-opt-# Columns | |
ctr-# Switch columns |
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
class Authenticator | |
def self.authenticate(email, password, encryption_engine = BcryptAdapter) | |
user = User.find_by_email(email) | |
return unless user | |
actual_hash = encryption_engine.encryptor(password, user.password_salt) | |
return user if user.password_hash == actual_hash |
OlderNewer