Skip to content

Commit

Permalink
Cleanup local zsh config
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Culver committed Aug 27, 2016
1 parent 2b14afb commit a764854
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions _zshrc.d/local.zsh
Expand Up @@ -13,11 +13,12 @@ PATH=$PATH:$RBENV_ROOT/bin
eval "$(rbenv init -)"
eval "$(rbenv usergems-init -)"

# Add GOPATH to path
PATH=$PATH:$GOPATH/bin

# Load Tmuxinator
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

# Load Resty
source /usr/local/bin/resty

# ------------------------------------------------------------------------
# Z
Expand Down Expand Up @@ -116,13 +117,31 @@ alias torcurl='curl --socks4a localhost:9150'
# ------------------------------------------------------------------------
# Functions
# ------------------------------------------------------------------------
# gd () {
# git diff $@ | cdiff -s
# }

# kill all django runserver instances
killmanage(){
ps -ef | grep "manage\.py runserver" | awk '{print $2}' | xargs kill -9
}

beepwhenup () { echo 'Enter host you want to ping:'; read PHOST; if [[ "$PHOST" == "" ]]; then exit; fi; while true; do ping -c1 -W2 $PHOST 2>&1 >/dev/null; if [[ "$?" == "0" ]]; then for j in $(seq 1 4); do beep; done; ping -c1 $PHOST; break; fi; done; }
beepwhenup () {
echo 'Enter host you want to ping:';
read PHOST;
[[ "$PHOST" == "" ]] && echo "must enter a host or IP" && return

while true; do
ping -c1 -W2 $PHOST 2>&1 >/dev/null
if [[ "$?" == "0" ]]; then
for j in $(seq 1 4); do
say "Host is up";
done
ping -c1 $PHOST
break
fi
done
}


# ------------------------------------------------------------------------
Expand Down

0 comments on commit a764854

Please sign in to comment.