Skip to content

Instantly share code, notes, and snippets.

@leesmith
leesmith / commit-message-syntax.txt
Created December 31, 2011 06:05
Pivotal Tracker post-commit message syntax
https://www.pivotaltracker.com/help/api?version=v3#github_hooks
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax
SCM Post-Commit Message Syntax
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321:
[#12345677 #12345678] Diverting power from warp drive to torpedoes.
@leesmith
leesmith / regex.txt
Created November 19, 2011 03:54
Regex cheatsheet
regex characters:
.
any character except newline
[ ]
any single character of set
[^ ]
any single character NOT of set
*
0 or more previous regular expression
*?
@leesmith
leesmith / pgsql-csv-dump.txt
Created November 1, 2011 18:43
Dump postgresql table into csv file
COPY (SELECT foo,bar FROM whatever) TO '/tmp/dump.csv' WITH CSV HEADER;
@leesmith
leesmith / URLs from routes
Created March 13, 2011 19:58
Rails one-liner to get URLs from rake routes
# http://trevmex.com/post/3822870892/rails-one-liner-to-get-urls-from-rake-routes
rake routes | sed -e "1d" -e "s,^[^/]*,,g" | awk '{print $1}' | sort | uniq