.yml looks like:
purchases_edit
cannot_edit: "Purchase cannot be edited after submission"
We can test in irb:
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| --colour | |
| -I app |
| #!/usr/bin/env ruby | |
| CHARACTERS = (('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a) | |
| GROUP = 53 | |
| MY_MACHINE_DYNDNS_ADDRESS = "Put your DynDns DNS name here" | |
| MY_SSH_PORT = "Your router's external port that will forward to SSH" # as a Fixnum | |
| def ridiculous_password | |
| (1..20).map do |
| #!/usr/bin/env ruby | |
| def delete_ssh_user(username) | |
| `rm -rf /Users/#{username}` | |
| `dseditgroup -o edit -d #{username} -t user com.apple.access_ssh` | |
| `dscl . -delete /Users/#{username}` | |
| end | |
| username = ARGV.shift | |
| delete_ssh_user username |
| -- from http://www.tuaw.com/2011/03/14/use-applescript-to-open-current-safari-url-in-google-chrome/ | |
| -- install FastScripts http://www.red-sweater.com/fastscripts/ and place this AppleScript in the Scripts applications folder for Google Chrome. | |
| -- For me that was ~/Library/Scripts/Applications/Safari | |
| -- You can then assign it a keyboard shortcut. I went with Cmd-Shift-C | |
| property theURL : "" | |
| tell application "Safari" | |
| set theURL to URL of current tab of window 1 | |
| end tell | |
| tell application "Google Chrome" |
| iPad | |
| 1024 × 690 In landscape on iOS 4.3 | |
| 1024 × 672 In landscape on iOS 5 | |
| 768 × 946 In portrait on iOS 4.3 | |
| 768 × 928 In portrait on iOS 5 | |
| 1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3 | |
| 1024 × 644 Always showing bookmarks bar in landscape on iOS 5 | |
| 768 × 916 Always showing bookmarks bar in portrait on iOS 4.3 |
| # Add this to your spec_helper.rb | |
| RSpec.configure do |config| | |
| config.treat_symbols_as_metadata_keys_with_true_values = true | |
| config.around(:each, :vcr) do |example| | |
| name = example.metadata[:full_description].downcase.gsub(/\W+/, "_").split("_", 2).join("/") | |
| VCR.use_cassette(name, :record => :new_episodes) do | |
| example.call | |
| end | |
| end | |
| end |
| # add this to your spec helper | |
| RSpec.configure do |config| | |
| config.treat_symbols_as_metadata_keys_with_true_values = true | |
| config.filter_run :focus => true | |
| config.run_all_when_everything_filtered = true | |
| end | |
| # and then use the :focus tag in your specs | |
| it "does something awesome", :focus do |