Skip to content

Instantly share code, notes, and snippets.

@MarcoGomesr
Created March 25, 2018 23:04
Show Gist options
  • Select an option

  • Save MarcoGomesr/04d69ce7091bb1fd49d1268fe2e41ba5 to your computer and use it in GitHub Desktop.

Select an option

Save MarcoGomesr/04d69ce7091bb1fd49d1268fe2e41ba5 to your computer and use it in GitHub Desktop.

Revisions

  1. MarcoGomesr created this gist Mar 25, 2018.
    79 changes: 79 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,79 @@
    export PATH=$PATH:/usr/local/bin
    export PATH=$PATH:/Users/Marco/.composer/vendor/bin/
    export PATH="/usr/local/mysql/bin:$PATH"
    export PATH="/usr/local/bin:$PATH"
    export GOPATH="/Volumes/Backup/dev/Sites/test/go"
    #export PATH=$PATH:/Applications/MAMP/Library/bin
    #export PATH=$PATH:/Applications/MAMP/bin/php/php5.5.3/bin
    export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
    export EDITOR='subl -w'
    #source ~/.profile
    #export PATH="$PATH:/usr/local/lib/node_modules/karma/bin"
    #export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH

    #aliases

    alias ht="http-server"
    alias pg="ping 8.8.8.8"
    #alias phps="php artisan serve"
    #alias php="/Applications/MAMP/bin/php/php5.5.3/bin/php"
    alias sites="cd /Volumes/Backup/dev/Sites"
    alias desk="cd ~/Desk"
    #alias lv="composer create-project laravel/laravel --prefer-dist"
    alias wh="cd /Users/Marco/whipgo"
    alias ie="cd /Volumes/Backup/dev/Sites/ie-platform"
    alias iep="cd /Volumes/Backup/data/Documents/ie-vagrant-vm"

    alias gs='git status'
    alias gc='git commit -m'
    alias ga='git add'
    alias gaa='git add .'
    alias gl='git log --graph --oneline --decorate --date=relative --all'
    #colors

    if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
    elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
    fi

    if tput setaf 1 &> /dev/null; then
    tput sgr0
    if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
    MAGENTA=$(tput setaf 9)
    ORANGE=$(tput setaf 172)
    GREEN=$(tput setaf 190)
    PURPLE=$(tput setaf 141)
    WHITE=$(tput setaf 256)
    else
    MAGENTA=$(tput setaf 5)
    ORANGE=$(tput setaf 4)
    GREEN=$(tput setaf 2)
    PURPLE=$(tput setaf 1)
    WHITE=$(tput setaf 7)
    fi
    BOLD=$(tput bold)
    RESET=$(tput sgr0)
    else
    MAGENTA="\033[1;31m"
    ORANGE="\033[1;33m"
    GREEN="\033[1;32m"
    PURPLE="\033[1;35m"
    WHITE="\033[1;37m"
    BOLD=""
    RESET="\033[m"
    fi



    parse_git_dirty () {
    [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
    }
    parse_git_branch () {
    git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
    }
    PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"


    #Always use color output for `ls`

    export NVM_DIR="/Users/Marco/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm