Skip to content

Instantly share code, notes, and snippets.

View pcg79's full-sized avatar

Pat George pcg79

  • FreeAgent
  • Edinburgh, Scotland
View GitHub Profile
#!/usr/bin/env ruby
require 'bundler'
gems = ARGV
if gems.empty?
puts "Updating all gems"
Bundler.definition(true)
// An Unobtrusive Javascript (UJS) driver based on explicit behavior definitions. Just
// put a "data-behaviors" attribute on your view elements, and then assign callbacks
// for those named behaviors via Behaviors.add.
var Behaviors = {
observers: {},
observe: function(trigger) {
$(document.body).observe(trigger, this.onTrigger.bind(this));
},
# Rails Template: something_great.rb
# by Jim Garvin (coderifous)
#
# * shoulda/mocha/factory girl
# * pacecar for lots of automatic scopes
# * haml
# * sprockets for javascript management
# * will paginate
# * limerick_rake gives some nice utilities
# * asks for a hoptoad API key, and if given, will setup hoptoad initializer