Skip to content

Instantly share code, notes, and snippets.

View john-griffin's full-sized avatar

John Griffin john-griffin

View GitHub Profile
@beef
beef / Gemfile
Created December 15, 2010 11:29
Production environment for Rails 3 on heroku with rack-cache
# Add this to your gem file
group :production do
gem 'dalli'
gem 'rack-cache', :require => 'rack/cache'
gem 'rack-contrib', :require => 'rack/contrib'
end
@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end
@czottmann
czottmann / Procfile
Created June 15, 2011 13:43
Example of a Foreman/Capistrano/upstart setup
worker: QUEUE=* bundle exec rake environment resque:work
scheduler: bundle exec rake environment resque:scheduler
@mrrooijen
mrrooijen / deploy.rb
Created June 26, 2011 02:37
Capistrano with Foreman Capfile
# encoding: utf-8
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require 'rvm/capistrano'
set :application, "hirefireapp"
set :repository, "git@codeplane.com:meskyanichi/myapp.git"
set :branch, "develop"
set :rvm_ruby_string, "1.9.2"
@mudge
mudge / canteen.coffee
Created October 31, 2011 23:05
A Hubot script to find out what is being served at the canteen today.
# Display what is for lunch today at the Macmillan canteen
#
# what's for lunch? - Returns the lunch options at the canteen today
jsdom = require 'jsdom'
formatOptions = (options) ->
options.replace(/(Veggie )?Main Course/, "").replace(/[\n\r]+/g, " ").trim()
module.exports = (robot) ->
@kylefinley
kylefinley / main.coffee
Created November 21, 2011 11:47
SproutCore 20 Routing + Statechart
require 'sproutcore'
require 'sproutcore-statechart'
require 'sproutcore-routing'
App = SC.Application.create()
App.GlobalNavController = SC.Object.create(
home: -> App.statechart.gotoState 'home'
about: -> App.statechart.gotoState 'about'
)
@dkubb
dkubb / .gitignore
Created December 5, 2011 18:26
Test Feedzirra w/VCR using an HTTP proxy
cassettes
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)
@ldunn
ldunn / gist:1526304
Created December 28, 2011 04:38
Cards Against Humanity (white)
Coat hanger abortions
Man meat
Autocannibalism
Vigorous jazz hands
Flightless birds
Pictures of boobs
Doing the right thing
Hunting accidents
A cartoon camel enjoying the smooth, refreshing taste of a cigarette
The violation of our most basic human rights
@ldunn
ldunn / gist:1526376
Created December 28, 2011 04:52
Cards Against Humanity (black)
_? There's an app for that
Why can't I sleep at night? _
What's that smell? _
I got 99 problems but _ ain't one.
Who stole the cookies from the cookie jar? _
What's the next Happy Meal (r) toy? _
Anthropologists have recently discovered a primitive tribe that worships _.
It's a pity that kids these days are all getting involved with _.
During Picasso's often-overlooked Brown Period, he produced hundreds of paintings of _.
Alternative medicine is now embracing the curative powers of _.