<commit_before># Setting a Facebook app on Heroku

## Software Installation and Configuration (1)

### Mac OS

* Install Xcode from the install DVD or Apple website or Mac App Store.

* Install Homebrew (package manager).

      curl https://gist.github.com/raw/323731/install_homebrew.rb > /tmp/install_homebrew.rb
      ruby /tmp/install_homebrew.rb

* Install Git (source code manager).

      brew install git

* Install database. You may pick anything that Rails supports, but since
  Heroku uses PostgreSQL, we recommend to use the same database.

      brew install postgresql
      initdb /usr/local/var/postgres
      pg_ctl -D /usr/local/var/postgres start
      createuser --createdb YourProject

* Setup postgres to auto-start after boot.

      cp `brew --prefix postgresql`/org.postgresql.postgres.plist ~/Library/LaunchAgents/
      launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

* ...or start up postgres manually:

      pg_ctl -D /usr/local/var/postgres start

* Install Ruby 1.9.2 (via Homebrew, but if you prefer RVM, it's fine).

      brew install ruby

### Ubuntu (Linux)

* Install various tools

      sudo apt-get update
      sudo apt-get install gcc g++ make libssl-dev zlib1g-dev libreadline5-dev libyaml-dev libxml2-dev

* Install Git (source code manger).

      sudo apt-get install git

* Install database. You may pick anything Rails supports, but since
  Heroku uses PostgreSQL, we recommend to use the same database.

      sudo apt-get install postgresql libpq-dev
      sudo /etc/init.d/postgresql restart
      sudo -u postgres createuser --createdb YourProject

  You might need to edit `pg_hba.conf` to make sure _YourProject_ has the
  access to your local database. For example, has the following line:

      local        all        YourProject        trust

  And make sure there's **NO** this line: (it conflicts with the above)

      local        all        all                ident

* Install Ruby 1.9.2

      bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
      echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile
      source $HOME/.rvm/scripts/rvm
      rvm install 1.9.2
      rvm use 1.9.2

### Windows (not tested)
<commit_msg>heroku-facebook.md: example path for pg_hba.conf<commit_after># Setting a Facebook app on Heroku

## Software Installation and Configuration (1)

### Mac OS

* Install Xcode from the install DVD or Apple website or Mac App Store.

* Install Homebrew (package manager).

      curl https://gist.github.com/raw/323731/install_homebrew.rb > /tmp/install_homebrew.rb
      ruby /tmp/install_homebrew.rb

* Install Git (source code manager).

      brew install git

* Install database. You may pick anything that Rails supports, but since
  Heroku uses PostgreSQL, we recommend to use the same database.

      brew install postgresql
      initdb /usr/local/var/postgres
      pg_ctl -D /usr/local/var/postgres start
      createuser --createdb YourProject

* Setup postgres to auto-start after boot.

      cp `brew --prefix postgresql`/org.postgresql.postgres.plist ~/Library/LaunchAgents/
      launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

* ...or start up postgres manually:

      pg_ctl -D /usr/local/var/postgres start

* Install Ruby 1.9.2 (via Homebrew, but if you prefer RVM, it's fine).

      brew install ruby

### Ubuntu (Linux)

* Install various tools

      sudo apt-get update
      sudo apt-get install gcc g++ make libssl-dev zlib1g-dev libreadline5-dev libyaml-dev libxml2-dev

* Install Git (source code manger).

      sudo apt-get install git

* Install database. You may pick anything Rails supports, but since
  Heroku uses PostgreSQL, we recommend to use the same database.

      sudo apt-get install postgresql libpq-dev
      sudo /etc/init.d/postgresql restart
      sudo -u postgres createuser --createdb YourProject

  You might need to edit `pg_hba.conf` (the path would be something like this:
  /etc/postgresql/8.4/main/pg_hba.conf) to make sure _YourProject_ has the
  access to your local database. For example, has the following line:

      local        all        YourProject        trust

  And make sure there's **NO** this line: (it conflicts with the above)

      local        all        all                ident

* Install Ruby 1.9.2

      bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
      echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile
      source $HOME/.rvm/scripts/rvm
      rvm install 1.9.2
      rvm use 1.9.2

### Windows (not tested)

{'fraction_non_alphanumeric': 0.08971882378192746, 'fraction_numerical': 0.00987336338270015, 'mean_word_length': 2.7369687249398558, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '78583', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1394, 'n_words': 498}