Skip to content

Instantly share code, notes, and snippets.

@amok
Last active October 10, 2015 12:08
Show Gist options
  • Select an option

  • Save amok/3687484 to your computer and use it in GitHub Desktop.

Select an option

Save amok/3687484 to your computer and use it in GitHub Desktop.
My .bashrc file
if [ -t 1 ];
then
setfont /usr/share/consolefonts/CyrSlav-Terminus14.psf.gz &> /dev/null
fi
PS1='\[\033[01;32m\]\u\[\033[01;34m\]\[\033[0;37m\]@\[\033[01;31m\]\h\[\033[01;34m\]\w/\[\033[0;37m\]\[\033[1;33m\]$(__git_ps1 "[%s]")\[\033[0;37m\]\$ \[\033[0m\]'
function kill-voracious() {
process=(`ps -u $USER -o pid,comm --sort %cpu | tail -n 1`);
pid=${process[0]};
name=${process[1]};
echo -n "Really kill ($name - $pid)? [y/n]: " ;
read ans;
case "$ans" in
y*|Y*) kill -KILL $pid ;;
*) return 1 ;;
esac
}
alias kill-voracious='kill-voracious';
alias mysql='/usr/bin/mysql --pager=less --show-warnings';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment