Created
August 3, 2009 20:32
-
-
Save toddboom/160814 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| export LC_CTYPE=en_US.UTF-8 | |
| export TERM=screen | |
| export PATH=/opt/ruby/bin:/var/lib/gems/1.8/bin:$PATH | |
| export EDITOR=vi | |
| export RAILS_ENV="production" | |
| export MERB_ENV="production" | |
| alias chives='cd ~/chives; python chives2.py >chives.log 2>&1 & tail -f chives.log' | |
| # aliases | |
| alias ls='ls -CFA --color=auto' | |
| alias g='grep' | |
| alias cls='clear' | |
| alias psg='ps aux | grep' | |
| alias ff='find . -type f' | |
| alias fd='find . -type d' | |
| alias ffg="find . -type f | grep" | |
| alias ffxg='find . -type f | xargs grep $1' | |
| alias fxg='ffxg' | |
| alias dos2unix='perl -pi -e 's/\r//' ' | |
| alias unix2dos='perl -pi -e 's/\n/\r\n/' ' | |
| alias rehash='. ~/.bash_profile' | |
| alias dusage='du -h -max-depth 1' | |
| alias untar='tar xzvf ' | |
| alias scream='screen -Rx' | |
| alias mountssh='mount_sshfs' | |
| alias tailf='tail -n0 -f' | |
| alias log='tail -n0 -f log/*.log *.log' | |
| alias df='df -h' | |
| alias portscan='sudo nmap -sA -p 1-65535' | |
| alias openports='sudo lsof -i | grep LISTEN' | |
| alias topcpu='ps -auxf | sort -nr -k 3 | head -5' | |
| alias topmem='ps -auxf | sort -nr -k 4 | head -5' | |
| # dev stuff | |
| alias mr='mongrel_rails' | |
| alias magma='cd ~/magma/current/' | |
| alias miner='cd ~/magma/current/miner' | |
| alias memedb='cd ~/memedb/current' | |
| alias scrapeserve='~/magma/current/script/runner ~/magma/current/miner/server.rb -L' | |
| alias scraper='rehash && miner && DEBUG=1 ruby scraper.rb' | |
| # we <3 git | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| function proml { | |
| local BLUE="\[\033[0;34m\]" | |
| local BLUE_BOLD="\[\033[1;34m\]" | |
| local RED="\[\033[0;31m\]" | |
| local LIGHT_RED="\[\033[1;31m\]" | |
| local GREEN="\[\033[0;32m\]" | |
| local LIGHT_GREEN="\[\033[1;32m\]" | |
| local WHITE="\[\033[0;37m\]" | |
| local WHITE_BOLD="\[\033[1;37m\]" | |
| local LIGHT_GRAY="\[\033[0;37m\]" | |
| local NO_COLOR="\[\033[0m\]" | |
| case $TERM in | |
| xterm*) | |
| TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
| ;; | |
| *) | |
| TITLEBAR="" | |
| ;; | |
| esac | |
| PS1="${TITLEBAR}[$NO_COLOR\u@$RED\h$NO_COLOR \w$GREEN\$(parse_git_branch)$NO_COLOR]\$ " | |
| PS2='> ' | |
| PS4='+ ' | |
| } | |
| proml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment