Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.


Google Analytics


  • [Some cool arel queries](http://stackoverflow.com/questions/4402815/is-there-a-particularly-elegant-way-to-do-a-count-query-with-rails-3-arel.
  • used a lamba as shown here, because otherwise the queries will be cached and we were running queries for a day to day basis.
  • ARel has some good documentation.

Local Storage

  • see the local storage article
  • I think this was the first time I used the push method in coffeescript.


  • in order to use z-index you need to use the position absolute, relative, or fixed as mentioned here


  • >* selects all the elements in the selector

PG backups

  • Backing up a larger DB on heroku -> docs

update 11/7/13 - heroku pgbackups:capture to capture the DB (make sure to specify app if you have multiple heroku apps) - heroku pgbackups will list the backups that have been made.

Anchor in a path helper

  • pass it in as an option redirect_to post_path(comment.post, :anchor => "comment-#{comment.id}") -> from


  • remember there is no whitespacing in regex
    • background_\w|clicked_space not background_\w | clicked_space

Background images in mobile

  • need to make sure to explicity define the background image and background size for mobile