Skip to content

Instantly share code, notes, and snippets.

View jaylevitt's full-sized avatar

Jay Levitt jaylevitt

View GitHub Profile
@jaylevitt
jaylevitt / demo.sql
Created September 20, 2012 00:14
Subquery in a JOIN not getting restricted
drop schema if exists jaytest cascade;
create schema jaytest;
set search_path to jaytest;
create table questions (
id int not null primary key,
user_id int not null
);
insert into questions
@dasch
dasch / rack.rb
Created September 1, 2011 09:17
Re-thought Rack API
class Middleware
# Processes a request before it reaches the application.
#
# The middleware can change the flow of the request/response chain by:
# - Raising an exception, which will halt the process
# - Returning an instance of Response, which will go through the middleware layer
#
# Returning any other value will not do anything.
def process_request(request)
# ...
@ELLIOTTCABLE
ELLIOTTCABLE / 1. README.mkdn
Created September 5, 2008 23:34
URL protocol handling in RubyCocoa