Created
November 23, 2010 14:15
-
-
Save roelven/711818 to your computer and use it in GitHub Desktop.
My .profile
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
## | |
## My .profile file. | |
## Replace Roel with your own username! | |
## | |
export PS1='\u@\h:\w $(vcprompt)\$ ' | |
export PATH=/usr/local/sbin:$PATH | |
export CDPATH=/Users/Roel/Sites | |
## | |
## Add awesome git functions to check differentiation between branches: | |
## | |
## See http://stackoverflow.com/questions/53569/how-to-get-the-changes-on-a-branch-in-git | |
## | |
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
function gbin { | |
echo -e "Branch ($1) has these commits and ($(parse_git_branch)) does not: \n" | |
git log ..$1 --no-merges --format='%h | Author: %an | %ad | %s' --date=local | |
} | |
function gbout { | |
echo -e "Branch ($(parse_git_branch)) has these commits and ($1) does not: \n" | |
git log $1.. --no-merges --format='%h | Author: %an | %ad | %s' --date=local | |
} | |
## Aliases | |
### Workflow | |
alias apachelog="tail -f /private/var/log/apache2/error_log" | |
alias apacherestart="sudo apachectl restart" | |
alias editapache="mate /private/etc/apache2/users/Roel.conf" | |
alias addhost="mate /private/etc/hosts" | |
alias addalias="mate ~/.profile" | |
alias phplog="tail -f /private/var/log/apache2/php.log" | |
alias cleansvn="find . -name ".svn" -type d -exec rm -rf {} \;" | |
alias www="cd /Users/Roel/Sites/" | |
alias l="ls -alh" | |
alias m="mate ." | |
alias sortfiles="find . -type f -exec du -sk {} \; | sort -nr" | |
alias gst="git status" | |
### SoundCloud | |
alias s="DEBUG=1 DISABLE_CACHE_CLASSES=1 rake soundcloud:development:start" | |
alias sk="DEBUG=1 DISABLE_CACHE_CLASSES=1 rake soundcloud:development:killall" | |
alias scuc="DEBUG=1 DISABLE_CACHE_CLASSES=1 rake soundcloud:development:start RAILS_ENV=cucumber" | |
alias scnewimg="git log --summary --diff-filter=A master -- ~/Sites/soundcloud/public/images" | |
alias scwatch="sass --watch public/stylesheets/sass:public --no-cache" | |
## Create new branch: git checkout -b better-pagetitles && git push -u origin better-pagetitles | |
## Make alias later | |
NVM_DIR=$HOME/.nvm | |
. $NVM_DIR/nvm.sh | |
nvm use v0.1.91 | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
if [[ -s /Users/Roel/.rvm/scripts/rvm ]] ; then source /Users/Roel/.rvm/scripts/rvm ; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment