Skip to content

Instantly share code, notes, and snippets.

@reinbach
reinbach / angularjs_server.py
Created January 24, 2013 16:01
Server to deliver angularjs application files.
import os
from werkzeug.exceptions import NotFound
from werkzeug.wrappers import Request, Response
from werkzeug.wsgi import SharedDataMiddleware, wrap_file
class Website(object):
def dispatch_request(self, environ, request):
filename = request.path if request.path != "/" else "index.html"
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
#!/bin/sh
#
# git-svn-diff -- SVN-compatible diff against the tip of the tracking branch
#
# ChangeLog
#
# Originally by http://mojodna.net/2009/02/24/my-work-git-workflow.html
#
# <mike@mikepearce.net>
# - <unknown changes>
@enjalot
enjalot / timing.py
Created March 7, 2011 11:31
A timing decorator class using a coroutine for the fun of it
import time
class Timing(object):
def __init__(self):
self.timings = {}
self.col = self.__collector()
self.col.next() #coroutine syntax
def __collector(self):
while True: