Created
September 1, 2015 21:57
-
-
Save johntran/f5b152d9179c96b20a1b to your computer and use it in GitHub Desktop.
ShipHawk bash profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval "$(rbenv init-)" | |
alias atm='open -a "Atom"' | |
alias prof='atm ~/.bash_profile' | |
alias dev='cd ~/Documents/shiphawk-dev' | |
alias dash='cd ~/Documents/dashboard-mvp' | |
alias hosts='sudo atm /private/etc/hosts' | |
alias elastic='elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml' | |
alias redis='redis-server /usr/local/etc/redis.conf' | |
alias rls-s='rails s' | |
alias gserve='gulp serve' | |
alias gs='git status ' | |
alias ga='git add ' | |
alias gb='git branch ' | |
alias gc='git commit' | |
alias gd='git diff' | |
alias go='git checkout ' | |
alias gk='gitk --all&' | |
alias gx='gitx --all' | |
alias log="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
function tab () { | |
local cmd="" | |
local cdto="$PWD" | |
local args="$@" | |
if [ -d "$1" ]; then | |
cdto=`cd "$1"; pwd` | |
args="${@:2}" | |
fi | |
if [ -n "$args" ]; then | |
if [ "$1" ]; then | |
cmd="; $1" | |
fi | |
if [ "$2" ]; then | |
cmd="; $1; $2" | |
fi | |
if [ "$3" ]; then | |
cmd="; $1; $2; $3" | |
fi | |
fi | |
osascript &>/dev/null <<EOF | |
tell application "iTerm" | |
tell current terminal | |
launch session "Default Session" | |
tell the last session | |
write text "cd \"$cdto\"$cmd" | |
end tell | |
end tell | |
end tell | |
EOF | |
} | |
function shiphawk () { | |
tab elastic | |
tab dev rls-s | |
tab dash gserve | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment