Skip to content

Instantly share code, notes, and snippets.

@seangeo
seangeo / Heroku tracking branch.txt
Created May 11, 2011 08:55
Create a local tracking branch of your heroku deployment
Assuming you have remote branch called heroku/master, start by creating a local tracking branch
called heroku.
> git checkout -b heroku -t heroku/master
This will checkout the last revision you deployed to Heroku.
Now tell git to push the heroku branch to heroku/master
> git config remote.heroku.push heroku:master
@ryanb
ryanb / index.js.erb
Created December 16, 2011 23:22
Infinite scrolling solution covered in revised episode #114: http://railscasts.com/episodes/114-endless-page-revised
$('#products').append('<%= j render(@products) %>');
<% if @products.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@products) %>');
<% else %>
$('.pagination').remove();
<% end %>
@baldwindavid
baldwindavid / Gemfile
Created March 28, 2012 14:52
The guts of a page tree using slugs - acts_as_tree, friendly_id - Allows for routes like /about/our-people/developers
gem 'acts_as_tree'
gem "friendly_id", "~> 4.0.1"