Created
December 23, 2011 18:36
-
-
Save jescalan/1515027 to your computer and use it in GitHub Desktop.
.dotfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Config Notes | |
# Dependencies: rbenv, ruby 1.9.3-p0, pow, powder, git, git_completion, grc | |
# | |
# path: | |
PS1='\[\e[0;31m\]⚡\[\e[m\] \[\e[0;30m\]${PWD##*/}\[\e[39m\] \[\e[0;33m\]$(__git_ps1 "(%s) ")\[\e[m\]' | |
# pretty colors (brew install grc) | |
source "`brew --prefix grc`/etc/grc.bashrc" | |
# general and rails | |
alias ll="ls -lahG" | |
alias reload="source ~/.profile" | |
alias profile="sub ~/.profile" | |
alias p="echo ''; cd ~/Projects; ls -c1; echo '';" | |
alias up="cd .." | |
alias desktop="cd ~/Desktop" | |
alias photoshop="open -a '/Applications/Adobe Photoshop CS4/Adobe Photoshop CS4.app'" | |
alias chrome="open -a Google\ Chrome.app" | |
alias gen="rails g" | |
alias migrate="rake db:migrate" | |
alias seed="rake db:seed" | |
alias img="open app/assets/images" | |
alias be="bundle exec" | |
alias rootstrap="git clone git@github.com:carrot/roots-static.git" | |
# matador (http://obvious.github.com/matador/) | |
matador_init() { | |
matador init $1; cd ~/; echo 'initializing...'; npm install matador; cd -; | |
} | |
# handy git shortcuts and hacks | |
source ~/.git_completion.sh | |
alias go="git checkout" | |
alias godev="git checkout develop" | |
alias s="echo ''; git status -sb; echo ''" | |
alias stage="git add ." | |
alias c="fact; git commit -am" | |
alias got='git ' | |
alias get='git ' | |
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" | |
alias branch="git branch" | |
alias mpush="git push origin master" | |
alias mpull="git pull origin master" | |
alias dpush="git push origin develop" | |
alias dpull="git pull origin develop" | |
alias amend="git commit --amend -m" | |
# powder shortcuts | |
alias r="powder" | |
alias opn="powder open" | |
alias log="powder applog" | |
# rbenv | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
# ============================================= | |
# Just for Fun | |
# ============================================= | |
# random interesting face | |
alias fact="echo '-------------------------------------------------------------------------------'; curl -s randomfunfacts.com | sed -n 's/.*<i>\(.*\)<\/i>.*/\1/p'; echo '-------------------------------------------------------------------------------';" | |
# play a ding | |
alias ding='afplay /System/Library/Sounds/Glass.aiff' | |
# get a random word from the system dictionary. | |
random_word() { | |
resource=/usr/share/dict/words; | |
lineNum=$(cat $resource | wc -l); | |
cat -n $resource | grep -w $(jot -r 1 1 $lineNum) | cut -f2; | |
} | |
# a git url shortener | |
gurl() { | |
if [ "$2" ] | |
then | |
url="url=$1 -F $2"; | |
else | |
url="url=$1"; | |
fi | |
curl -i http://git.io -F $url | |
} | |
# Setting PATH for JRuby 1.6.7 | |
# The orginal version is saved in .profile.jrubysave | |
PATH="${PATH}:/Library/Frameworks/JRuby.framework/Versions/Current/bin" | |
export PATH | |
# {{{ | |
# Node Completion - Auto-generated, do not touch. | |
shopt -s progcomp | |
for f in $(command ls ~/.node-completion); do | |
f="$HOME/.node-completion/$f" | |
test -f "$f" && . "$f" | |
done | |
# }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment