Skip to content

Instantly share code, notes, and snippets.

@maebeale
Created July 27, 2014 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maebeale/cd98a793316ab01dd09d to your computer and use it in GitHub Desktop.
Save maebeale/cd98a793316ab01dd09d to your computer and use it in GitHub Desktop.
export PS1="\[\e[00;34m\]\w\[\e[0m\]\[\e[00;37m\]\\$ \[\e[0m\]"
### HISTORY CONTROL
export HISTCONTROL="erasedups"
shopt -s histappend
export HISTFILESIZE=50000
export HISTSIZE=9999
export HISTIGNORE="&:[ ]*:exit:quit:bg:fg"
### GIT PROMPT
# GIT_PROMPT_SH=/usr/local/etc/bash_completion.d/git-prompt.sh
# if [[ -f $GIT_PROMPT_SH ]]; then
# source $GIT_PROMPT_SH
# fi
#export PS1="\w\$(__git_ps1) \$ "
### ENVIRONMENT
export EDITOR="atom -w" # or your own choice
### export PATH=./bin:~/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin/:/usr/bin:/bin:/usr/sbin:/sbin
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
### ALIASES
alias edit=$EDITOR
alias mkdir="mkdir -p"
alias ll="ls -laFH"
alias http='python -m SimpleHTTPServer'
alias cd tiya='cd tiya/projects ls'
# Cleanup
alias rmlogs="find . -name '*.log' | xargs rm"
alias rmorig="find . -name '*.orig' | xargs rm"
# Git
alias ga='git add'
alias gb='git branch'
alias gaa='git add --all'
alias gap='git add --patch'
alias gc='git commit'
alias gcm='git commit -m '
alias glog="git log --graph"
alias gpp='git pp'
alias gs='git status'
alias gst='git status'
# Bundler
alias bi="bundle install --path vendor"
alias bu="bundle update"
alias be="bundle exec"
alias bo="bundle open"
alias binit="bi && echo 'vendor/ruby' >> .gitignore"
# OS X
if [[ $(uname) == 'Darwin' ]]; then
# Flush Directory Service cache
alias dnsflush="dscacheutil -flushcache && killall -HUP mDNSResponder"
# Clean up LaunchServices to remove duplicates in the “Open With” menu
alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
# Show/hide hidden files in Finder
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# Disable/enable Spotlight
alias spotoff="sudo mdutil -a -i off"
alias spoton="sudo mdutil -a -i on"
# Update Homebrew
alias update='brew update && echo "\n==> Outdated" && brew outdated'
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
# Setting PATH for Python 3.4
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
# RBENV
eval "$(rbenv init -)"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment