Skip to content

Instantly share code, notes, and snippets.

@gabrielstuff
Created March 9, 2012 11:40
Show Gist options
  • Save gabrielstuff/2006190 to your computer and use it in GitHub Desktop.
Save gabrielstuff/2006190 to your computer and use it in GitHub Desktop.
Bash profile startup
echo Hello !
export PS1="\[\033[0;32m\]\u\[\033[0m\]@\[\033[0;34m\]\h\[\033[1;36m\]\w\[\0[0m\]: "
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/:/Users/igab/gtk/inst/lib/pkgconfig/
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Users/gabrielstuff/bin:$PATH"
test -r /sw/bin/init.sh && . /sw/bin/init.sh
cd /tmp
if [ -h mysql.sock ]
then
echo mysql is ready !
else
ln -s /var/mysql/mysql.sock
fi
cd -
##Brake
alias brake="bundle exec rake"
alias r="rails"
##Passenger
alias s="passenger start"
#Color branches
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
PS1='\t:\[\033[0;32m\]\u\[\033[0m\]@\[\033[01;31m\]\w\[\033[1;35m\]$(parse_git_branch)\[\033[00m\] \$ '
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
#gitinit function for initialize a git repo
gitinit(){
git init
touch .gitignore
echo -e "# Compiled source #\n###################\n\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n\n# Packages\n############\n# it's better to unpack these files and commit the raw source\n# git has its own built in compression methods\n*.7z\n*.dmg\n*.gz\n*.iso\n*.jar\n*.rar\n*.tar\n*.zip\n\n\n# Logs and databases #\n######################\n*.log\n*.sql\n*.sqlite\n\n# OS generated files #\n######################\n.DS_Store\n.DS_Store?\nehthumbs.db\nIcon?\nThumbs.db" >> .gitignore
git add .gitignore
git commit -m "first commit"
echo -e "\n########\nFirst empty commit... now adding README file\n########\n"
username=`id -nu`
current_date=`date`
touch README
echo -e "\nGit repo by $username\n Automatically generated on $current_date" >> README
echo -e "########\nREADME file added...\n########\n"
git add README
git commit -am "\nadding README file infos to repository"
echo -e "\n########\nDone, have fun $username!\n########\n"
}
export CC=/usr/bin/gcc-4.2
fortune | cowsay -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment