Skip to content

Instantly share code, notes, and snippets.

View kristiankristensen's full-sized avatar

Kristian Kristensen kristiankristensen

View GitHub Profile
@kristiankristensen
kristiankristensen / simplewebserver.py
Created April 2, 2012 18:29
Simple web server in Python that just prints to console
import SimpleHTTPServer
import SocketServer
import string,cgi,time
from os import curdir, sep
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class MyHandler(BaseHTTPRequestHandler):
def handle_request(self):
try:
@kristiankristensen
kristiankristensen / simplewebserver.py
Created April 2, 2012 18:28
Simple web server in Python that just prints to console
import SimpleHTTPServer
import SocketServer
import string,cgi,time
from os import curdir, sep
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class MyHandler(BaseHTTPRequestHandler):
def handle_request(self):
try:
@kristiankristensen
kristiankristensen / templates_initializer
Created October 20, 2011 17:25
Rails generators and initializers
require 'tweethook'
TweetHook::Config.track_keywords = Array['bieber']