Run previous command
		    		
!^ - the first argument from the previous command
!$ - the last argument from the previous command
!* - all of the arguments from the previous command
!! - the entire previous command

# For example:
  $ apt-get install foo
  # Crap
  $ sudo !!
		    		
	    		

Check for connectivity

		    		
nc -z <host> <port>
		    		
	    		
		    						
alias reload='source /Users/bdalgaard/.bash_profile'
alias mysql=/usr/local/mysql/bin/mysql
alias RD2='ssh hdpadmin@rd2-m01-elk.trustwave.com'
alias ls='ls -GhF'
alias ll='ls -Ghal'
# Make rm and mv interactive, can override with rm -f
alias rm='rm -i'
alias mv='mv -i'
#alias python=bpython
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
export JAVA_HOME=`/usr/libexec/java_home -v 1.6`
# export TOMCAT_HOME=`/Applications/apache-tomcat-7.0.41`
									
	    						
		    						
black="\033[1;30m";
red="\033[1;31m";
green="\033[1;32m";
yellow="\033[1;33m";
blue="\033[1;34m";
magenta="\033[1;35m";
cyan="\033[1;36m";
white="\033[1;37m";
norm="\033[0;39m";

if [ "$PS1" ]; then
	if [[ $UID -eq 0 ]]; then
		PS1="\[$yellow\][\[\$(date +%H:%M:%S)\]] \[$red\]\u@\h:\w\\[$norm\] # "
	else
		PS1="\[$yellow\][\[\$(date +%H:%M:%S)\]] \[$cyan\]\u@\h:\w\\[$norm\] $ "
	fi
	export PS1=""$PS1"\[\e]30;\u@\h\a\]"
fi
									
	    						
		    					
titleChange() {
	#do things with parameters like $1 such as
	PROMPT_COMMAND='printf "\033]0;'$1'\007"'
}