Skip to content

Instantly share code, notes, and snippets.

@jtadeulopes
Created June 23, 2010 14:07
Show Gist options
  • Select an option

  • Save jtadeulopes/449959 to your computer and use it in GitHub Desktop.

Select an option

Save jtadeulopes/449959 to your computer and use it in GitHub Desktop.
.bash_profile
export GREP_OPTIONS="--color=auto"
export GREP_COLOR="4;33"
export CLICOLOR="auto"
source ~/.git-completion.sh
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
export SCALA_HOME="/usr/local/scala-2.7.7.final"
export JAVA="$JAVA_HOME/bin/java"
export SCALA="$SCALA_HOME/bin/scala"
export PATH="$JAVA_HOME/bin:$SCALA_HOME/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/Users/jtadeulopes/lib/mysql-connector-java-5.1.12-bin.jar"
export SCALA_LIBRARY_JAR="/usr/local/scala-2.7.7.final/lib/scala-library.jar"
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
# rvm
# if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
PS1='\n[\u] \[\033[1;33m\]\w\a\[\033[0m\] \[\033[1;30m\][$(~/.rvm/bin/rvm-prompt)] \[\033[0m\]\[\033[1;32m\]$(parse_git_branch)\[\033[0m\]\n$ '
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
# recarrega source
reload() { source ~/.bash_profile; }
# alias
alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM start"
alias stop_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM stop"
alias restart_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM restart"
alias restart_apache="sudo /usr/sbin/apachectl restart"
alias flush_dns="dscacheutil -flushcache"
alias nr='sudo kill -HUP `cat /opt/nginx/logs/nginx.pid`'
alias ll='ls -l'
##
# Your previous /Users/jtadeulopes/.bash_profile file was backed up as /Users/jtadeulopes/.bash_profile.macports-saved_2010-04-26_at_12:10:29
##
# MacPorts Installer addition on 2010-04-26_at_12:10:29: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# open a new tab on Terminal with the current working dir
function newt {
osascript -e "
tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down
tell application \"Terminal\" to do script \"cd $PWD \" in selected tab of the front window
" > /dev/null 2>&1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment