Featured Aliases

rgc() {
    git commit -m"`curl -s http://whatthecommit.com/index.txt`"
}
cdb(){
        echo "CREATE DATABASE $1" | sudo mysql --defaults-extra-file=/etc/mysql/debian.cnf
}
alias json="python -mjson.tool"
alias dskload="ps faux|awk '\$8 ~ /D/{print}'"
alias gitsearch='git rev-list --all | xargs git grep -F'
alias hs='history | grep --color=auto'
devmode(){
drush vset preprocess_css 0 -y
drush vset preprocess_js 0 -y
drush vset page_compression 0 -y
drush vset cache 0 -y
drush vset block_cache 0 -y
drush vset less_devel 1 -y
}
alias github="chrome \`git remote -v | grep github.com | grep fetch | head -1 | field 2 | sed 's/git:/http:/g'\`"
function undozip(){
  unzip -l "$1" |  awk 'BEGIN { OFS="" ; ORS="" } ; { for ( i=4; i<NF; i++ ) print $i " "; print $NF "\n" }' | xargs -I{} rm -r {}
}
alias logs="tac /var/log/apache2/error.log | less"
alias agi='sudo apt-get install -y'
function stats () {
   if [ ! $1 ] || [ $1 == '-a' ]; then
     perl -ne 'chomp(); $sum += $_; ++$n; END { printf "$n\t$sum\t%.2e\n", $sum/$n }'
   elif [ $1 == '-m' ]; then
     perl -ne 'chomp(); $sum += $_; ++$n; END { printf "%.2e\n", $sum/$n }'
   elif [ $1 == '-s' ]; then
     perl -lne 'chomp(); $sum += $_; ++$n; END { print $sum }'
   fi
}
alias findInHistory="history |grep "

Pages