Skip to content

Instantly share code, notes, and snippets.

group :dev do
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'merb-colorful-logger'
end
@virgild
virgild / git show changed files
Created March 1, 2011 19:14
git list files that have changed since a commit
git diff SHA1...SHA2 --name-only
#!/bin/bash
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
# Color codes
RED='\[\033[01;31m\]'
GREEN='\[\033[01;32m\]'
@virgild
virgild / psgrep
Created January 25, 2011 02:42
useful psgrep
alias psgrep='ps aux | grep $(echo $1 | sed "s/^\(.\)/[\1]/g")'
#!/bin/bash
#
# The Bash shell script executes a command with a time-out.
# Upon time-out expiration SIGTERM (15) is sent to the process. If the signal
# is blocked, then the subsequent SIGKILL (9) terminates it.
#
# Based on the Bash documentation example.
# Dmitry V Golovashkin <[email protected]>
scriptName="${0##*/}"
TextMate
--------
Default File Pattern:
---------------------
!(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
Default Folder Pattern:
-----------------------
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
user nginx;
worker_processes 5;
error_log /var/log/nginx.error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}