Last active
February 17, 2021 17:31
-
-
Save florianvazelle/e648209a08b7ca4a4c7d09d20c985964 to your computer and use it in GitHub Desktop.
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
# 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