Skip to content

Instantly share code, notes, and snippets.

@apcurran
Created July 26, 2022 18:37
Show Gist options
  • Save apcurran/bb430cb9a5bcc0194d2a45ed04373e3a to your computer and use it in GitHub Desktop.
Save apcurran/bb430cb9a5bcc0194d2a45ed04373e3a to your computer and use it in GitHub Desktop.
# postgres
alias pg-start='sudo service postgresql start'
alias pg-run='sudo -u postgres psql'
alias pg-stop='sudo service postgresql stop'
alias pg-status='sudo service postgresql status'
# more ls
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Git
alias gs='git status'
alias gaa='git add .'
alias gcm='git commit -m'
alias gp='git push'
alias gpl='git pull'
alias gd='git diff'
# System
alias supgrade='sudo apt update; sudo apt upgrade'
# Python
alias python='python3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment