Skip to content

Instantly share code, notes, and snippets.

@Saigesp
Last active September 3, 2023 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saigesp/f8253722fc1f05745294a296c482cf3f to your computer and use it in GitHub Desktop.
Save Saigesp/f8253722fc1f05745294a296c482cf3f to your computer and use it in GitHub Desktop.
# Virtualenv
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ '
# Thefuck
eval "$(thefuck --alias)"
# Common aliases
alias run='python manage.py runserver'
alias serve='npm run serve'
# Node Version Manager
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# cd & ls
cdls() { cd "$@" && ls; }
# Pypi
alias pybuild='python setup.py sdist bdist_wheel'
alias pypublish='python -m twine upload dist/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment