Last active
August 29, 2015 14:16
-
-
Save tnrich/91deea34c648fb38f537 to your computer and use it in GitHub Desktop.
tnr's .profile
This file contains 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
#update this gist here: https://gist.github.com/tnrich/91deea34c648fb38f537 | |
#note this command isn't working for me | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
#VE specific commands | |
alias gpuo='git push -u origin' | |
alias gpod='git pull origin dev' | |
############################################# | |
# alias pullReq='pullr -n -i dev -d' | |
alias gp='git push' | |
alias gcam='git commit -am' | |
alias gcb='git checkout -b' | |
alias gs='git status -sb' | |
alias gc='git checkout' | |
alias gm='git mergetool' | |
# git branch history | |
alias gbh="git for-each-ref --count=20 --sort=-committerdate refs/heads/ --format='%(refname:short)'" | |
#open diff in sublime. | |
#ex: gd | |
#ex: gd head^ | |
#ex: gd 7b3f441147f7c3c4b27bb7c9658aef27e3d0a5eb ee49bbc57f7376bc9f5c951e13808cb6b66be3d8 | |
gd() { | |
if [ $# -eq 0 ] | |
then | |
git diff | subl | |
else | |
git diff $@ | subl | |
fi | |
} | |
pullreq() { | |
# echo hey | |
fullText=$1 | |
# set -- $1 | |
# echo pullr -n -i dev -d &fullText - | |
# echo pullr -n -i dev -t ${fullText:0:30} -d fullText | |
pullr -n -i dev -t '"'${fullText:0:30}'"' -d '"'$fullText'"' | |
# pullr -n -i dev -d | |
} | |
#use this to start the app | |
inspectApp() { | |
#these commands kill a single node-inspector process if it is running | |
pid=$(ps | grep node-inspector | grep -v "grep" | cut -d' ' -f1) | |
echo $pid | |
kill $pid | |
sleep 1 | |
#start node-inspector and nodemon | |
node-inspector & nodemon --debug app.js --remote | |
} | |
#use this to start the app with it paused on the first line! | |
pauseBackend() { | |
#these commands kill a single node-inspector process if it is running | |
pid=$(ps | grep node-inspector | grep -v "grep" | cut -d' ' -f1) | |
echo $pid | |
kill $pid | |
sleep 1 | |
#start node-inspector and nodemon | |
node-inspector & nodemon --debug-brk app.js --remote | |
} | |
alias updateNpmPackage="npm version patch && npm publish" | |
# checkout prev (older) revision | |
git_prev() { | |
git checkout HEAD~ | |
} | |
# checkout next (newer) commit | |
git_next() { | |
BRANCH=`git show-ref | grep $(git show-ref -s -- HEAD) | sed 's|.*/\(.*\)|\1|' | grep -v HEAD | sort | uniq` | |
HASH=`git rev-parse $BRANCH` | |
PREV=`git rev-list --topo-order HEAD..$HASH | tail -1` | |
git checkout $PREV | |
} | |
export PATH=/Users/trich/bin/Sencha/Cmd/4.0.4.84:$PATH | |
export SENCHA_CMD_3_0_0="/Users/trich/bin/Sencha/Cmd/4.0.4.84" | |
## | |
# Your previous /Users/tnrich/.profile file was backed up as /Users/tnrich/.profile.macports-saved_2015-07-03_at_00:24:01 | |
## | |
# MacPorts Installer addition on 2015-07-03_at_00:24:01: adding an appropriate PATH variable for use with MacPorts. | |
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
PATH="$PATH:/Users/tnrich/Documents/flow/" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment