<commit_before>#!/bin/sh

set -e
DOTFILES_ROOT="$HOME/.dotfiles"
cd "$HOME"

ln_s () {
  ln -sfn "$DOTFILES_ROOT/$1" "$2"
}

echo "Checking for SSH key, generating one if it doesn't exist"
  [[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa

echo "Copying public key to clipboard. Paste it into your Github account"
  [[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy
  open https://github.com/account/ssh

echo "Installing Homebrew"
  /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
  brew update

echo "Installing Git"
  brew install git
  brew install git-flow

echo "Installing Ack"
  brew install ack

echo "Installing Tmux"
  brew install tmux

echo "Installing Vim"
  curl ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar -xz
  cd vim73 && ./configure --with-features=huge --enable-cscope --enable-rubyinterp --enable-multibyte --enable-clipboard=yes --enable-xterm_clipboard=yes && make && sudo make install
  cd .. && rm -rf vim*

echo "Installing PostgreSQL"
  brew install postgres --no-python
  initdb /usr/local/var/postgres

echo "Installing Redis"
  brew install redis

echo "Install MongoDB"
  brew install mongo

echo "Installing Node"
  brew install node
  curl http://npmjs.org/install.sh | sh

echo "Installing Rbenv"
  brew install rbenv
  brew install ruby-build

echo "Installing Ruby"
  rbenv install 2.0.0-p0
  if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
  rbenv shell 2.0.0-p0
  rbenv rehash

echo "** Installing basic gems"
  gem install bundler --no-rdoc --no-ri
  gem install rails   --no-rdoc --no-ri
  gem install heroku  --no-rdoc --no-ri

echo "** Configuring RubyGems.org account"
  mkdir -p ~/.gem
  curl -u jodosha https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials

  rbenv rehash

echo "** Configuring Heroku account"
  heroku auth:login

echo "Cloning dotfiles repo"
  rm -rf ~/.dotfiles
  git clone --recursive https://github.com/jodosha/dotfiles.git ~/.dotfiles

echo "Configuring Oh-My-ZSH"<commit_msg>Don't install Ri and RDoc for Ruby gems<commit_after>#!/bin/sh

set -e
DOTFILES_ROOT="$HOME/.dotfiles"
cd "$HOME"

ln_s () {
  ln -sfn "$DOTFILES_ROOT/$1" "$2"
}

echo "Checking for SSH key, generating one if it doesn't exist"
  [[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa

echo "Copying public key to clipboard. Paste it into your Github account"
  [[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy
  open https://github.com/account/ssh

echo "Installing Homebrew"
  /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
  brew update

echo "Installing Git"
  brew install git
  brew install git-flow

echo "Installing Ack"
  brew install ack

echo "Installing Tmux"
  brew install tmux

echo "Installing Vim"
  curl ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar -xz
  cd vim73 && ./configure --with-features=huge --enable-cscope --enable-rubyinterp --enable-multibyte --enable-clipboard=yes --enable-xterm_clipboard=yes && make && sudo make install
  cd .. && rm -rf vim*

echo "Installing PostgreSQL"
  brew install postgres --no-python
  initdb /usr/local/var/postgres

echo "Installing Redis"
  brew install redis

echo "Install MongoDB"
  brew install mongo

echo "Installing Node"
  brew install node
  curl http://npmjs.org/install.sh | sh

echo "Installing Rbenv"
  brew install rbenv
  brew install ruby-build

echo "Installing Ruby"
  rbenv install 2.0.0-p0
  if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
  rbenv shell 2.0.0-p0
  rbenv rehash

echo "** Installing basic gems"
  echo 'gem: --no-ri --no-rdoc' > ~/.gemrc
  gem install bundler
  gem install rails
  gem install heroku

echo "** Configuring RubyGems.org account"
  mkdir -p ~/.gem
  curl -u jodosha https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials

  rbenv rehash

echo "** Configuring Heroku account"
  heroku auth:login

echo "Cloning dotfiles repo"
  rm -rf ~/.dotfiles
  git clone --recursive https://github.com/jodosha/dotfiles.git ~/.dotfiles

echo "Configuring Oh-My-ZSH"
{'fraction_non_alphanumeric': 0.13278609367455335, 'fraction_numerical': 0.00772573635924674, 'mean_word_length': 3.3021806853582554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '441475', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1539, 'n_words': 433}