Skip to content

Instantly share code, notes, and snippets.

@lc512k
Last active August 29, 2015 14:08
Show Gist options
  • Save lc512k/757740e36027e82c0b81 to your computer and use it in GitHub Desktop.
Save lc512k/757740e36027e82c0b81 to your computer and use it in GitHub Desktop.
my .profile
export JAVA_HOME=$(/usr/libexec/java_home -v1.7)
export MAVEN_OPTS="-Xmx256m"
export PATH="/opt/mvn/bin:$PATH"
export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH" #MacPorts
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\033[0;33m\]\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
# Git autocomplete
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
# Keep master shiny
master() {
git co master
git fetch --all
git merge origin/master
}
# Shortcuts
alias h='cd /Users/laura/mobileweb/frontend/hotornot/'
alias b='cd /Users/laura/mobileweb/frontend/badoo/'
alias m='cd /Users/laura/mobileweb/'
alias p='cd /Users/laura/Personal/'
# Get the latest proto and mvn it
proto () {
status=$(/Users/laura/mobileweb/proto/update_proto.sh)
for i in {16..21} {21..16} ; do printf "\e[48;5;${i}m \e[0m" ; done ;
if [ "$status" != "Already up-to-date." ]; then
printf '\e[0;35mPulled new proto stuff. Mavening...\e[0m\n'
cd /Users/laura/mobileweb/
mvn process-resources
printf '\e[0;35mMavened!\e[0m\n'
else
printf '\e[0;35mProto up-to-date. Yay!\e[0m\n'
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment