Last active
November 1, 2017 11:53
-
-
Save vadakattu/1db4176dfd5dae645a9d09f51b108f41 to your computer and use it in GitHub Desktop.
Frequently used commands
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
# create virtualenv with specific python | |
virtualenv -p /usr/local/bin/python2 xxx2 | |
virtualenv -p /usr/local/bin/python3 xxx3 | |
# Upgrade all packages with pip | |
pip list --outdated | cut -d ' ' -f1 | xargs -n1 pip install -U | |
pip2 list --outdated | cut -d ' ' -f1 | xargs -n1 pip2 install -U | |
pip3 list --outdated | cut -d ' ' -f1 | xargs -n1 pip3 install -U | |
# Git shortcuts | |
alias gcam='git commit -am"' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gpl='git pull' | |
alias gps='git push' | |
# scp shortcut to copy from a remote server to local | |
export copyfromserver='scp [email protected]:' | |
# quickly source virtualenv | |
alias py3='source ~/py3/bin/activate' | |
alias py2='source ~/py2/bin/activate' | |
# Forward ports and connect to a remote server | |
export nbport='-L 8888:localhost:8888' | |
export tboard='-L 6006:localhost:6006' | |
alias server='ssh $nbport $tboard [email protected]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment