Skip to content

Instantly share code, notes, and snippets.

View jessedearing's full-sized avatar

Jesse Dearing jessedearing

View GitHub Profile
module Scopes
attr_writer :church_id
# evaluates to
# instance_eval do
# def church_id
# @church_id
# end
# def church_id=(value)
# @church_id = value
# end
1740 minutes per apppool
[reflection.assembly]::loadfrom((resolve-path
D:\NET\Projects\Watchtower\Code\ECS.WatchTower.Testing.MessageSender\bin\Debug\ECS.WatchTower.Testing.MessageSender.dll))
switch($env:DeployTo) {
'old_dev' {}
'old_qa' {}
'old_staging' {}
}
class ApplicationController < ActionController::Base
protect_from_forgery
def initialize(*args)
super
self.view_paths.delete_if {|i| i.to_s =~ /\/social_stream-.*-\d+\.\d+\.\d+\w*\//}
end
end
@jessedearing
jessedearing / hipchat smileys.png
Created August 18, 2011 19:32
Hipchat smileys
(android)
(areyoukiddingme)
(arrington)
(awyeah)
(basket)
(beer)
(bunny)
(bumble)
(cadbury)
(cake)
@jessedearing
jessedearing / 1a.rb
Created August 23, 2011 02:37
Case-when
case 1 + 1
when 2 then puts "win"
end
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
#user nobody;
user jessed staff;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
# If your workers are inactive for a long period of time, they'll lose
# their MySQL connection.
#
# This hack ensures we re-connect whenever a connection is
# lost. Because, really. why not?
#
# Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar)
#
# From:
# http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/