Skip to content

Instantly share code, notes, and snippets.

@dux
Last active October 27, 2017 01:18
Show Gist options
  • Save dux/244dc8188e8d9752113183d2fb6bc88a to your computer and use it in GitHub Desktop.
Save dux/244dc8188e8d9752113183d2fb6bc88a to your computer and use it in GitHub Desktop.
my osx ~/.profile
alias ls="command ls -G"
alias cp="cp -iv"
alias mv="mv -iv"
alias mkdir="mkdir -pv"
alias less="less -FSRXc"
mexe() { touch $1 && chmod +x $1 && subl $1; } # make executable and edit
ffl() { find . -name "*$@*"; } # find file local
fff() { mdfind -name $1; } # find file global
ff() { find . -type d -name "*$@*"; } # find folder
gg() { git grep "$@"; }
export NO_PROFILER=true
export HISTSIZE=5000
export HISTTIMEFORMAT='%b %d %I:%M %p '
export HISTCONTROL=ignoreboth:erasedups
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export NODE_PATH=/usr/local/lib/node_modules
export NVM_DIR="/Users/dux/.nvm"
export GOBIN="/Users/dux/dev/go/bin"
export GOPATH="/Users/dux/dev/go"
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/10/bin
export PATH=$PATH:/usr/local/opt/go/libexec/bin
export PATH=$PATH:/usr/local/heroku/bin
export PATH=$PATH:/usr/local/sbin
export PATH=$PATH:$GOBIN
export PATH=$PATH:$HOME/bin
export PATH=$PATH:$HOME/dev/ruby/bin
# git branch in prompt.
PS1='\w\[\033[0;32m\]$( git branch 2> /dev/null | cut -f2 -d\* -s | sed "s/^ / [/" | sed "s/$/]/" )\[\033[0m\] \$ '
# tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# tell ls to be colourful
export CLICOLOR=1
export LSCOLORS=Exfxcxdxbxegedabagacad
eval $(/usr/libexec/path_helper -s)
complete -C aws_completer aws
# autojump
export PROMPT_COMMAND="history -a"
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
# add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# must be at a bottom
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment