Skip to content

Instantly share code, notes, and snippets.

View notsobad's full-sized avatar

notsobad notsobad

View GitHub Profile
@wesleyhales
wesleyhales / confess-mod.js
Created July 26, 2012 20:52
phantom script
var fs = require('fs');
var confess = {
run: function () {
var cliConfig = {};
confess.performancecache = this.clone(confess.performance);
if (!this.processArgs(cliConfig, [
{
name: 'url',
def: 'http://google.com',
@codebrainz
codebrainz / gist:1009404
Created June 5, 2011 20:44
On the fly tarball creation CGI script.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# archive.py
#
# Copyright 2011 Matthew Brush <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@paulosuzart
paulosuzart / tornado_basic_auth.py
Created November 2, 2010 19:52
Sample (working) for basic http auth on tornado
def authenticated(auth):
def decore(f):
def _request_auth(handler):
handler.set_header('WWW-Authenticate', 'Basic realm=tmr')
handler.set_status(401)
handler.finish()
return False