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
- any character you use it will literally match it except special characters | |
^ $ ? . / \ [ ] { } ( ) + * - all the special characters that will need escaping if you don't want them to be special | |
// - regexp ruby class | |
Common Patterns (I authored) | |
/[\w+\.~-]+@[\w~-]+.[\w\.]+/ - match emails, conforms to RFC 3986 section 3.3 | |
/\+?(\d)?[-|\.|\s]?\(?(\d{3})\)?[-|\.|\s]?(\d{3})[-|\.|\s]?(\d{4})/ - match phone numbers, https://gist.github.com/1009331 | |
Strategies |
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
run("echo group :test, :development do >> Gemfile;") | |
run("echo gem \\'rspec-rails\\', \\'\\>\\= 2.3.0\\' >> Gemfile;") | |
run("echo gem \\'capybara\\', \\'0.3.9\\' >> Gemfile;") | |
run("echo gem \\'database_cleaner\\' >> Gemfile;") | |
run("echo gem \\'cucumber-rails\\' >> Gemfile;") | |
run("echo gem \\'launchy\\' >> Gemfile;") | |
run("echo end >> Gemfile;") | |
run("bundle install") |
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
#!/usr/bin/env ruby | |
# Made by Pieter de Bie <[email protected]> | |
# Based on a "Pastie" task by someone | |
require "tempfile" | |
GIST_URL = 'http://gist.github.com/gists' | |
GIST_LOGIN_URL = 'https://gist.github.com/session' | |
USERNAME = "martinisoft" | |
TOKEN = "6ef8395fecf207165f1a82178ae1b984" |