Skip to content

Instantly share code, notes, and snippets.

@lc512k
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save lc512k/757740e36027e82c0b81 to your computer and use it in GitHub Desktop.

Select an option

Save lc512k/757740e36027e82c0b81 to your computer and use it in GitHub Desktop.

Revisions

  1. lc512k revised this gist Nov 1, 2014. 1 changed file with 13 additions and 6 deletions.
    19 changes: 13 additions & 6 deletions .profile
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,33 @@
    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
    export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH" #MacPorts

    # Git branch in prompt.
    # 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
    # Git autocomplete
    if [ -f ~/.git-completion.bash ]; then
    . ~/.git-completion.bash
    fi

    # Shortcuts
    # 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
    # Get the latest proto and mvn it
    proto () {
    status=$(/Users/laura/mobileweb/proto/update_proto.sh)

    @@ -34,4 +41,4 @@ proto () {
    else
    printf '\e[0;35mProto up-to-date. Yay!\e[0m\n'
    fi
    }
    }
  2. lc512k created this gist Nov 1, 2014.
    37 changes: 37 additions & 0 deletions .profile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    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

    # 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
    }