Skip to content

Instantly share code, notes, and snippets.

@Dakad
Last active July 31, 2017 22:42
Show Gist options
  • Save Dakad/1935ec4e44a0519be628bf9da3806439 to your computer and use it in GitHub Desktop.
Save Dakad/1935ec4e44a0519be628bf9da3806439 to your computer and use it in GitHub Desktop.
My bash_aliases
#==============================
#
# ALIASES
#
#==============================
# 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$//'\'')"'
# Retrieve my public IP from OpenDNS
alias wimip='dig +short myip.opendns.com @resolver1.opendns.com'
alias wimpip=wimip
alias wimpip=wimip
alias what_is_my_ip=wimip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment