Skip to content

Instantly share code, notes, and snippets.

View ebertech's full-sized avatar

Andrew Eberbach ebertech

View GitHub Profile
function inherit(p) {
if (p == null) throw TypeError();
if (Object.create)
return Object.create(p);
var t = typeof p;
if (t !== "object" && t !== "function") throw TypeError();
function f() {};
f.prototype = p;
return new f();
}
@ebertech
ebertech / config.ru
Created March 6, 2012 01:02
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
# We are not loading Active Record, nor the Assets Pipeline, etc.
# This could also be in your Gemfile.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
# The following lines should come as no surprise. Except by
From 352a6fba010ad5e9c09c27e364e9c8c0f40d0265 Mon Sep 17 00:00:00 2001
From: Andrew Eberbach <andrew@ebertech.ca>
Date: Sat, 11 Sep 2010 19:45:46 -0400
Subject: [PATCH] fixes issue 22, updates tests to use :xhr => true
---
spec/rack/bug/panels/sql_panel_spec.rb | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/spec/rack/bug/panels/sql_panel_spec.rb b/spec/rack/bug/panels/sql_panel_spec.rb
From e2e1789a8546cee99fcf07a4b44a0515d1e3a52e Mon Sep 17 00:00:00 2001
From: Andrew Eberbach <andrew@ebertech.ca>
Date: Sat, 11 Sep 2010 19:32:29 -0400
Subject: [PATCH] fixes issue 22. The SQL toolbar could not send profile, explain and select requests because the middleware would not process xhr requests
---
lib/rack/bug.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/rack/bug.rb b/lib/rack/bug.rb