#alias ls='ls -F --color'
#[ -x /usr/games/fortune ] && /usr/games/fortune bofh-excuses 
#alias la='ls -Fal --color'
#alias uptime="uptime | cowsay"
#alias date="date | cowsay"


#Imperatives
# enable color support of ls and also add handy aliases
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'

case `uname` in
Linux)
	alias ls='ls -F --color=auto'
	#if [ "$TERM" != "dumb" ]; then
		#eval "`dircolors -b`"
	#fi
	#alias ls='ls -F --color=auto'
        #alias open='xdg-open'
	;;
Darwin)
	alias ls='ls -FG'
	;;
FreeBSD)
	alias ls='ls -FG'
	;;
SunOS)
	#alias ls='ls -F'
	;;
*)
	#if [ "$TERM" != "dumb" ]; then
		#eval "`dircolors -b`"
	#fi
	#alias ls='ls --color=auto'
	;;
esac

	

# some more ls aliases
alias ll='ls -lF'
#alias la='ls -A'
alias la='ls -alF'
#alias l='ls -CF'

alias :e='vi'
alias t='task'
alias em='emacs'
alias grep="grep --color=auto"
#alias screen="screen -R"
alias dvtm="dvtm -m \"^w\""
alias tm="tmux -2 attach"
alias ppjson="python -mjson.tool"
#alias tmux-pwn='tmux list-clients | sed "s|^\(/dev/ttys[0-9]\+\).*\[\([0-9]\+x[0-9]\+\).*$|\2 \1|" | sort -r -n | tail -n +2 | cut -d " " -f 2 | xargs -n 1 tmux detach-client -t'

# I can never remember the xclip options, so:
alias setclip='xclip -selection c'
alias getclip='xclip -selection clipboard -o'

#machines
alias puck="ssh -D 7777 -Y barak@puck.barakmich.com"
alias hero="ssh -D 7777 -Y barak@hero.barakmich.com"
alias hermia="ssh -Y barak@hermia.home.0b100.net"

#Cosmetic/useful
#alias naim="naim --noscreen"
alias wallall="wallall -p"
#alias cal="cal -3"
#alias google='surfraw google'
alias hd='od -Ax -tx1z -v'
alias gcal='gcalcli'

#Sysdadmin
alias aptsearch="aptitude search"
alias pki="pk i"
alias pks="pk s"
alias openports="lsof -i 4 -n"
alias saupdate="sa-learn --mbox --spam ~/mail/spam"
alias pshosers="ps axeo pcpu,pid,user,command | sort -k 1 -r | head -11 "
alias memhosers="ps axeo size,pcpu,pid,user,command | sort -n -r | head -11 "
alias psx="ps auxwww | grep $1"
alias blaze="bazel"
alias pb='curl -F c=@- https://busb.us/'
alias pburl='curl -F c=@- https://busb.us/u'

#work
alias totemp="cd `pwd | sed 's/controllers/templates/'`"
alias tocont="cd `pwd | sed 's/templates/controllers/'`"

alias kubecat="awk 'FNR==1 && NR!=1 {print \"---\"}{print}'"

#Some orly aliases
alias yarly="orly -y"
alias nowai="orly -n"
alias srsly="orly -s"
 
#Funnies
alias whothefuckis='finger'
alias whoami="echo 24601"

dobenchx() {
  benchcmp $1 $2 | awk -f $HOME/bin/benchx.awk
}
alias benchx=dobenchx

do_killgrep() {
	ps auxwww | grep $1 | awk '{print $2}' | xargs kill
}
alias killgrep=do_killgrep
#function gvim () {
      #`which gvim` $* &> /dev/null
#}

source $HOME/.tz_aliases.sh
