This file contains hidden or 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 | |
HELP = <<EOS | |
git-wtf displays the state of your repository in a readable and easy-to-scan | |
format. It's useful for getting a summary of how a track branch relates to a | |
remote server, and for understanding how feature branches and relate to | |
integration branches. | |
git-wtf can show you: | |
- How a branch relates to the remote repo, if it's a tracking branch. |
This file contains hidden or 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/sh | |
/Applications/MacVim.app/Contents/MacOS/MacVim $* |
This file contains hidden or 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
# Save as db/seed.rb | |
# | |
# Run with script/runner db/seed.rb | |
def unique_attributes | |
{ | |
MyModel => [:name], | |
MyOtherModel => [:category, :type] | |
} | |
end |
This file contains hidden or 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
# Rake task for listing all Cucumber features defined | |
namespace :cucumber do | |
task :features do | |
list = { :given => [], :when => [], :then => [] } | |
files = Dir.glob(File.join(File.dirname(__FILE__),'features','**','*.rb')).each do |f| | |
File.readlines(f).select { |l| l =~ /\s*[^#]?\s*(Given|When|Then)\s\// }.each do |line| | |
line =~ /(Given|When|Then)\s+(\/\^?)?([^$\/]+)(\$?\/)?/ | |
type = $1.downcase.to_sym | |
name = "#{$1} #{$3}".strip |
This file contains hidden or 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
# Script to import data from mymilemarker.com mpg data to the Road Trip fuel economy tracking app | |
# Steps for OS X users: | |
# 1. Download this file to your user directory | |
# 2. Log into mymilemarker.com | |
# 3. Go to http://mymilemarker.com/vehicles/car-name/histories.xml?all=1 | |
# 4. Download the XMl file to histories.xml.colloquytranscript.xml in your home directory | |
# 5. Open Terminal app | |
# 6. type "gem install hpricot" | |
# 7. type "ruby fuel.rb" | |
# 8. type "cat history.csv | pbcopy" |
This file contains hidden or 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
Feature: Your Mom | |
In order to infuriate our users | |
We will insult their mothers | |
Scenario: Housing | |
Given your mom is so fat | |
When she sits around the house | |
Then she really sits around the house | |
Scenario: Dangerous cereal |
This file contains hidden or 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 | |
while [ true ] ; clear; do ls -la $1; sleep 1; done |
This file contains hidden or 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
Scenario "Never going to give you up" do | |
Given "We are no strangers to love" | |
And "You know the rules and so do I" | |
When "a full commitment is what I'm thinking of" | |
Then "you wouldn't get this from any other guy" | |
And "I just wanna tell you how I'm feeling" | |
And "I gotta make you understand" do | |
Rick.should_not_receive(:give_up).with(:you) | |
Rick.should_not_receive(:let_down).with(:you) | |
Rick.should_not_receive(:run_around_and_desert).with(:you) |
NewerOlder