Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
class Organization | |
def to_param | |
"42" | |
end | |
def saved? | |
rand > 0.5 | |
end | |
end | |
#!/bin/bash | |
# Create the directory structure | |
mkdir -p features/step_definitions | |
mkdir -p features/support | |
# Create a placeholder for the step_definitions folder | |
touch features/step_definitions/"$(basename `pwd`)_steps.rb" | |
# Create the environment file |
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" |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/usr/bin/env ruby | |
# vim: set syntax=ruby | |
# Ensures that changes to the Rails schema.rb file may only be committed if a | |
# migration file is also committed at the same time. | |
def schema_modified? | |
%x[ git diff --cached |grep schema.rb ] == '' | |
end |