exhaustive list of aliases that i use for my dev setup
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
| # Aliases | |
| alias 'cd..'='cd ..' | |
| alias ls='ls -CF' | |
| alias ll='ls -alF' | |
| alias la='ls -ACF' | |
| alias grep='grep --color=auto' | |
| alias fgrep='fgrep --color=auto' | |
| alias egrep='egrep --color=auto' | |
| alias sag='sudo apt-get' | |
| alias sar='sudo apt autoremove' | |
| alias cls='clear' | |
| alias editbash='nano ~/.bashrc' | |
| alias reloadbash='source ~/.bashrc && echo Bash Reloaded!' | |
| alias ipi='hostname -I' | |
| alias ipe='curl ipinfo.io/ip && printf "\n"' | |
| alias 'kore_nani?'='if [[ $((KORE_NANI_COUNT+=1)) -ge 6 ]]; then nyancat; KORE_NANI_COUNT=0; fi;' | |
| ## Windows Aliases | |
| alias psql='psql.exe' | |
| alias mongod='mongod.exe' | |
| alias mongo='mongo.exe' | |
| alias ngrok='ngrok.exe' | |
| alias ffmpeg='ffmpeg.exe' | |
| alias flutter='cmd.exe /c flutter' | |
| alias sqlite3='sqlite3.exe' | |
| ## Python Aliases | |
| actenv() {source "$@"/bin/activate} | |
| alias crtenv='pyenv virtualenv' # 'python -m venv' | |
| alias catjson='python -m json.tool' | |
| alias pir='pip install -r requirements.txt' | |
| alias pyserve="python3 -m http.server" | |
| alias pfr='pip freeze > requirements.txt' | |
| export MIG_DIR='migration-dir' | |
| alias alre() {cd $MIG_DIR; alembic revision $@; cd -} | |
| alias alup() {cd $MIG_DIR; alembic upgrade $@; cd -} | |
| alias aldn() {cd $MIG_DIR; alembic downgrade $@; cd -} | |
| export PYPROJ='current_python_project' | |
| alias wsgi="gunicorn $PYPROJ.wsgi:application" | |
| alias asgi="daphne $PYPROJ.asgi:application" | |
| ### Django Aliases | |
| alias dj='python manage.py' | |
| alias djr='python manage.py runserver' | |
| alias djmm='python manage.py makemigrations' | |
| alias djm='python manage.py migrate' | |
| alias djs='python manage.py shell' | |
| alias djdb='python manage.py dbshell' | |
| alias djcs='python manage.py collectstatic --noinput' | |
| alias djt='python manage.py test' | |
| ## Docker Aliases | |
| export DCFL='docker-compose.yml' | |
| export DCON='docker-container-name' | |
| alias dcps='docker ps' | |
| alias dcbl="docker compose -f $DCFL build" | |
| alias dcup="docker compose -f $DCFL up -d" | |
| alias dcdn="docker compose -f $DCFL down" | |
| alias dcex="docker exec -it $DCON sh" | |
| ## Git Aliases | |
| parse_git_branch2() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
| } | |
| alias gbr='git branch' | |
| alias gps='git push' | |
| alias gpl='git pull' | |
| alias gch='git checkout' | |
| alias gco='git commit -m' | |
| alias gst='git status' | |
| gad() { git add "${@:-.}"; } | |
| alias grs='git reset' | |
| alias grb='git rebase' | |
| alias gd='git diff' | |
| alias gup="git push --set-upstream origin \$(parse_git_branch2)" | |
| # git out, making meme a reality :p | |
| git() { if [[ $@ == "out" ]]; then command "exit"; else command "git $@"; fi; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment