Skip to content

Instantly share code, notes, and snippets.

@matheusramos
Last active March 1, 2016 21:20
Show Gist options
  • Save matheusramos/e927c886944db08d90fe to your computer and use it in GitHub Desktop.
Save matheusramos/e927c886944db08d90fe to your computer and use it in GitHub Desktop.
My personal .bashrc
# Kill all processes that contains the string from the first parameter.
monsterkill() {
read -p "Are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
ps -ef | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9
fi
}
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
alias aptinstall='sudo apt-get install -y'
alias ..='cd ..'
alias ...='cd ../../../'
alias :q='exit' # vim user :)
alias ll='ls -l'
alias la='ls -a'
alias monsterkill=monsterkill
################################################
# SOURCES #
# 1. http://qr.ae/RUbhwT #
################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment