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
Shoes.setup do | |
gem "mime-types" | |
gem "open4" | |
source "http://gems.github.com/" | |
gem "mojombo-grit" | |
end | |
require 'mojombo-grit' | |
repo = Grit::Repo.new(Dir.pwd) | |
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
var banList = ["valentine", "Valentine", "Valentine's","Valentines","valentine's","valentines","v-day","V-day","V-Day","vday","Vday","VDay","VALENTINE","VALENTINE'S"]; | |
var allUpdates = document.getElementsByTagName('h3'); | |
for (phrases in banList) { | |
for (eachUpdate in allUpdates) { | |
if (allUpdates[eachUpdate].innerHTML.match(banList[phrases])) { | |
allUpdates[eachUpdate].parentNode.parentNode.style.display = "none"; | |
} | |
} | |
} |
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
Given /^that ([^"]*) has (\d+) ([^"]*)$/ do |parent, count, child| | |
parent = parent.gsub(/\W+/,'_').downcase.sub(/^_/, '') | |
parent_instance = instance_variable_get("@#{parent}") | |
child = child.gsub(/\W+/,'_').downcase | |
child_class = Fabrication::Support.class_for(child.singularize) | |
if child_class && !child_class.new.respond_to?("#{parent}=") | |
parent = parent.pluralize | |
parent_instance = [parent_instance] | |
end |
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
Mail.register_interceptor(StagingMailInterceptor) if Rails.env.staging? || Rails.env.acceptance? |
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
find . -not \( -name .svn -prune -o -name .git -prune \) -type f -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*$//" |
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
# I want to have better messaging, diffs, etc. here | |
RSpec::Matchers.define :include_hash do |expected| | |
match do |actual| | |
binding.pry | |
!expected.map {|k,v| actual[k] == v }.include?(false) | |
end | |
failure_message_for_should do |actual| | |
"expected that #{actual} would include all the key/values of #{expected}" |
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
this | |
is | |
a | |
test |
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
this | |
is | |
a | |
test | |
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
Pull in the latest commits: | |
$ git fetch | |
Rebase your branch on top of the remote master: | |
$ get rebase origin/master | |
Go back to master: | |
$ git checkout master | |
Fetch pulls down commits but doesn't apply them. So you need to put those commits on master: |
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
for k in `git branch -r|awk '{print $1}'`;do echo `git show --pretty=format:"%Cgreen%ci %Cblue%cr %Cred%cn %Creset" $k|head -n 1`$k;done|sort -r |
OlderNewer