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
class Stopwatch | |
attr_writer :splits, :max, :start, :end, :total | |
def initialize(message) | |
@message = message | |
@splits = [] | |
@max = 5 | |
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
$ git branch -r --merged | | |
sed '/>|master/d;/origin/!d;s:origin/::' | | |
xargs git push origin --delete | |
# I think this will work, but I don't know how to get git branch to show me that -> line |
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 | |
# Converts those nasty xml documents word likes to create into something | |
# remotely resembling markdown | |
# Fun side effect: you'll get every revision of the document! | |
abort "No file name given" unless filename = ARGV.first | |
remove_tags = [ | |
'\?xml', |
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 | |
# this script takes your current commit, finds all the submodules in it, | |
# makes them static files in a new tree and updates a branch called 'heroku' | |
# - this way you can push a project with submodules to heroku easily | |
# just run this, then run "git push heroku heroku:master" | |
current_commit = `git rev-parse HEAD` | |
current_tree = `git rev-parse HEAD^{tree}` | |
puts "Starting at tree #{current_tree}" |
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
# sh function to murder all running processes matching a pattern | |
# thanks 3n: http://twitter.com/3n/status/19113206105 | |
murder () { | |
ps | grep $1 | grep -v grep | awk '{print $1}' | xargs kill -9 | |
} |
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
/tmp/compare/svn$ svn commit -m 'commit me' | |
Sending what.txt | |
Transmitting file data . | |
Committed revision 13. | |
/tmp/compare/svn$ svn info | |
Path: . | |
URL: http://localhost:5203/svn | |
Repository Root: http://localhost:5203/svn | |
Repository UUID: 3b9a9e50-8ead-4325-b308-a6ad9b1ac2aa |