Skip to content

Instantly share code, notes, and snippets.

@SchumacherFM
SchumacherFM / db.go
Created February 15, 2015 00:13
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
@kelleyk
kelleyk / tornado_basic_auth.py
Created July 9, 2011 15:51
A simple decorator that makes a RequestHandler prompt for basic auth username and password
# A decorator that lets you require HTTP basic authentication from visitors.
# Kevin Kelley <kelleyk@kelleyk.net> 2011
# Use however makes you happy, but if it breaks, you get to keep both pieces.
# Post with explanation, commentary, etc.:
# http://kelleyk.com/post/7362319243/easy-basic-http-authentication-with-tornado
# Usage example:
#@require_basic_auth
#class MainHandler(tornado.web.RequestHandler):