visit('/projects')
visit(post_comments_path(post))
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
// REQUIRES: | |
// http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js | |
// http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js | |
// Based on: https://gist.github.com/1395926 | |
$(document).ready(function() { | |
$('.gist').each(function(i) { | |
var file_separator = $(this).text().indexOf('#'); | |
if (file_separator != -1) { | |
var gist_url = $(this).text().slice(0, file_separator); | |
var gist_file = $(this).text().slice(file_separator).replace("#file_", "?file="); |
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
# encoding: utf-8 | |
pt-BR: | |
address_full: "Endereço Completo:" | |
neighborhood: "Bairro" | |
number: "Número:" | |
complement: "Complemento:" | |
zipcode: "CEP:" | |
state: "Estado:" | |
city: "Cidade:" |
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
# encoding: utf-8 | |
require "spec_helper" | |
describe "Logout" do | |
context "when logged in" do | |
user = Factory(:mgt_admin) | |
use_mgt_host |
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 | |
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
app_name = ARGV[0] | |
initial_resource_name = ask('What is your initial resource ?') | |
remove_file 'Gemfile' | |
create_file 'Gemfile', <<-eos | |
source 'https://rubygems.org' | |
gem 'rails', '3.2.6' |
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 |
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 |