Last active
August 29, 2015 14:22
-
-
Save ajeebkp23/fceff995ada81d0ccbcd to your computer and use it in GitHub Desktop.
BashAliases
This file contains 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
#common things | |
alias fwpath='install -Dv /dev/null ' | |
alias w1='cd ~/Documents/folder1/' | |
alias w2='cd ~/Documents/folder2' | |
alias pro='ps -ef| g ' | |
alias g='grep ' | |
alias curr='pwd | x' | |
alias 1234='p manage.py runserver localhost:1234 ' | |
alias 2323='p manage.py runserver localhost:2323 ' | |
alias hserve='p -m SimpleHTTPServer 8080' | |
alias h='history ' | |
#python | |
alias pf='pip freeze' | |
alias pipi='pip install ' | |
alias p='python ' | |
alias vi='pyvim ' | |
#to make virtualenv work | |
source /usr/local/bin/virtualenvwrapper.sh | |
#edit this file | |
alias balias='vim ~/.bash_aliases' | |
alias rbash='source ~/.bash_aliases' | |
#django | |
alias dj='python manage.py ' | |
alias djrun='python manage.py runserver' | |
alias djbzr='cd folder1 && workon envdjbzr && 1234' | |
alias dome='cd folder2 && workon dasdfome && 2323' | |
#git | |
alias g.='git ' | |
alias g.one='git log --oneline' | |
alias g.st='git status' | |
alias g.ad='git add .' | |
alias g.all='git add -A' | |
alias g.m='git commit -m ' | |
alias g.df='git diff ' | |
#copy to clipboard | |
alias x='xclip -i -o ' | |
#webfaction directory codes directory | |
wfpy='~/wf/' | |
#get a new password | |
alias passfu="python -c $'import getpass,crypt,random,string; print crypt.crypt(getpass.getpass(), \"\".join(random.sample(string.ascii_letters + string.digits, 8)))'" | |
#fast ping | |
function fastping () | |
{ | |
ping $1 -i .2 -c 3 | |
} | |
#moving fast | |
alias ..='cd ..' | |
alias ...='cd ../../' | |
alias ....='cd ../../../' | |
alias .....='cd ../../../../' | |
alias .1='cd ..' | |
alias .2='cd ../../' | |
alias .3='cd ../../../' | |
alias .4='cd ../../../../' | |
alias .5='cd ../../../../..' | |
# if user is not root, pass all commands via sudo # | |
if [ $UID -ne 0 ]; then | |
alias reboot='sudo reboot' | |
alias apt-get='sudo apt-get' | |
alias update='sudo apt-get update' | |
alias upgrade='sudo apt-get upgrade' | |
fi | |
#upgrade and update | |
alias superflash='update && upgrade' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment