Public Gists by galfert

Gravatar
Thu Aug 20 12:12:42 -0700 2009
1
2
3
[user]
  name = Scott Chacon
  email = schacon@gmail.com
Gravatar
Fri Aug 14 01:27:17 -0700 2009
1
2
3
// only outputs if console available and does each argument on its own line
function log() {
  if (window && window.console && window.console.log) {
gist: 129157 Show the git branch in bash...
Gravatar
Sat Jun 13 02:13:41 -0700 2009
1
2
3
function parse_git_branch {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
Gravatar
Sat Apr 04 03:29:06 -0700 2009
1
2
3
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
Gravatar
Sat Feb 21 03:19:50 -0800 2009
1
2
# deploy to staging from your current topic branch, with ease
set :branch, "origin/#{`git branch`.scan(/^\* (\S+)/)}"
Gravatar
Sun Dec 28 08:40:03 -0800 2008
1
2
3
# RAILSLOVE.com template
#
# with help and ideas from:
Gravatar
Sun Dec 28 08:39:40 -0800 2008
1
2
3
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper