Last active
June 13, 2022 12:48
-
-
Save gamorales/8af5bf5950215bb67247d14491d2a306 to your computer and use it in GitHub Desktop.
.bashrc or .bash_profile configuration
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
alias android='/bin/sh /opt/android-studio/bin/studio.sh' | |
alias postman='cd /opt/postman/app;./Postman' | |
alias www='cd /var/www/html && clear && ls' | |
alias cdpython='cd ~/Documentos/desarrollo/python && clear && ls' | |
alias cddjango='cd ~/Documentos/desarrollo/python/django && clear && ls' | |
alias cdandroid='cd ~/Documentos/desarrollo/android && clear && ls' | |
alias cddocker='cd ~/Documentos/desarrollo/docker && clear && ls' | |
alias buildpython='make -j2 -s' | |
alias djangorun='python3 manage.py runserver' | |
alias djangoshell='python3 manage.py shell' | |
alias djangostatic='python3 manage.py collectstatic' | |
alias djangomake='python3 manage.py makemigrations' | |
alias djangomigrate='python3 manage.py migrate' | |
alias pyenv='python3 -m venv venv && source venv/bin/activate' | |
alias startsshagent='eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa' | |
# .bashrc or .bash_profile function to delete all containers, images and volumes running | |
del_docker_containers() { | |
docker ps --all | |
docker kill $(docker ps -q) | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -q) | |
docker volume rm $(docker volume ls -q) | |
docker image prune -a | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# GIT aliases | |
alias gbranch="git branch" | |
gpush() { | |
git push origin "$1" | |
} | |
gadd() { | |
git add "$@" | |
} | |
gchange() { | |
git checkout "$1" | |
} | |
gmake() { | |
git checkout -b "$1" | |
} | |
export PS1="\nᕙ(⇀‸↼‶)ᕗ ┌─o ${debian_chroot:+($debian_chroot)}\[\033[0;96m\]\u@\h \[\033[00m\]IN \[\033[01;36m\][\w] \[\033[00m\]AT \[\033[34m\]\$(date +'%T') \[\033[33m\]\$(parse_git_branch)\[\033[00m\]\[\033[00m\]\n (•)(•)ԅ(‾⌣‾ԅ) └─o \$ " | |
#export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\[\033[00m\]\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment