Skip to content

Instantly share code, notes, and snippets.

@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
@roopeshvaddepally
roopeshvaddepally / .irbrc
Created June 24, 2011 04:50 — forked from loginx/.irbrc
~/.irbrc config file to enable ActiveRecord logging to the rails console (if in rails console) and enable IRB autocompletion and autoindent.
require 'irb/completion'
require 'pp'
IRB.conf[:AUTO_INDENT]=true
if defined?(Rails) && !Rails.env.nil?
ActiveRecord::Base.logger = Logger.new(STDOUT)
end
@hellojwilde
hellojwilde / _core.scss
Created January 17, 2011 03:02
An SCSS port of the Deco Grid System (deco.gs)
/* This is an **unofficial** [SCSS](http://sass-lang.com/) port of preview 2
of the [Deco Grid System](http://deco.gs/). The Deco Grid System was
originally written by [Alexander Limi](http://limi.net/) and released under
a [public domain/BSD](http://twitter.com/limi/status/10865858377154560)
license.
This port was created by [Jonathan Wilde](http://www.speedbreeze.com/).
Jonathan doesn't deserve much credit, though, since Alexander Limi did all
of the hard work. ;) This file is licensed under the same terms as the
original Deco Grid System CSS.