Created
March 1, 2012 20:38
-
-
Save richleland/1953075 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
| # basic unix operations | |
| alias ll="ls -l" | |
| alias ls="ls -G" | |
| # git aliases | |
| alias gb="git branch" | |
| alias gba="git branch -a" | |
| alias gc="git commit -v" | |
| alias gd="git difftool" | |
| alias gl="git pull" | |
| alias gp="git push" | |
| alias gst="git status" | |
| # file deletion | |
| alias dorig='find . -type f -name "*.orig" -exec rm -rf {} \;' | |
| alias dpyc='find . -type f -name "*.pyc" -exec rm -rf {} \;' | |
| alias dsvn='find . -name ".svn" -print0 | xargs -0 rm -rf' | |
| # python Debug local mail server | |
| alias pymail="python -m smtpd -n -c DebuggingServer localhost:1025" | |
| # renaming file extensions | |
| alias lower_jpg='for i in *.JPG; do mv "$i" "${i%.JPG}.jpg"; done' | |
| # tree flags | |
| alias tree="tree -C --dirsfirst -I '*.pyc'" | |
| # prompt config | |
| export PS1='\[\e[0;35m\]\u\[\e[0;33m\] \w\[\e[0;36m\]$(/usr/local/bin/vcprompt -f " [%n:%b]")\[\e[00m\]: ' | |
| # bash completion | |
| source /etc/bash_completion | |
| # python-specific | |
| export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache/ | |
| export WORKON_HOME=$HOME/.virtualenvs | |
| export PIP_VIRTUALENV_BASE=$WORKON_HOME | |
| if [ -e "/usr/local/bin/virtualenvwrapper.sh" ] | |
| then source /usr/local/bin/virtualenvwrapper.sh | |
| fi | |
| # pip bash completion start | |
| _pip_completion() | |
| { | |
| COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD PIP_AUTO_COMPLETE=1 $1 ) ) | |
| } | |
| complete -o default -F _pip_completion pip | |
| # pip bash completion end | |
| # shortcut to re-show the motd | |
| alias vmhelp="cat /etc/motd" | |
| # shortcut for running Django's dev server and setting up a new project | |
| alias djrun="sudo django-admin.py runserver 0.0.0.0:80 --settings=settings.dev" | |
| alias djsetup="pip install -r requirements.txt" | |
| # move into the shared folder | |
| cd /shared/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment