Skip to content

Instantly share code, notes, and snippets.

@florianvazelle
Last active February 17, 2021 17:31
Show Gist options
  • Save florianvazelle/e648209a08b7ca4a4c7d09d20c985964 to your computer and use it in GitHub Desktop.
Save florianvazelle/e648209a08b7ca4a4c7d09d20c985964 to your computer and use it in GitHub Desktop.
# Git branch name in prompt
if [ "$color_prompt" = yes ]; then
PS1="\[\033[95m\]\u@\h \[\033[32m\]\W\[\033[33m\] [\$(git symbolic-ref --short HEAD 2>/dev/null)]\[\033[00m\]\$ "
else
PS1="\u@\h \W [\$(git symbolic-ref --short HEAD 2>/dev/null)]\$ "
fi
# Docker shortcuts
alias dps='docker-compose ps'
alias dlogs='docker-compose logs --tail 50 -f '
# Setup python virtual env
venv()
{
virtualenv --python=python3.8 venv
source venv/bin/activate
touch venv/pip.conf
find . -name requirements.txt -exec pip install -r {} ';'
}
# Kill all app containing the first argument in its name
tue()
{
ps aux | grep -e $1 | awk '{print $2}' | xargs kill -9
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment