Skip to content

Instantly share code, notes, and snippets.


Greg Reinbach reinbach

View GitHub Profile

Keybase proof

I hereby claim:

  • I am reinbach on github.
  • I am reinbach ( on keybase.
  • I have a public key ASAyUwI8X0QadcfAzZa4ZgELeKrscohnjjBAjBton_SwSQo

To claim this, I am signing this object:

reinbach /
Created Jan 24, 2013
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"
reinbach / gist:1818298
Created Feb 13, 2012
Convert dir from url_pattern to brand_code
View gist:1818298
#!/usr/bin/env python
# brand templates are stored in url_pattern values
# script converts these dirnames to brand_code values
# for each dir in the brand template
# find the brand based on the dir being url_pattern of a brand
# get the brand code for the brand
# change the dir name to the brand_code value
reinbach / view_vgc_prompt
Created Nov 7, 2011
view vgc prompt template snippets for facebook interaction
View view_vgc_prompt
{% if facebook_apikey %}
<script src=""></script>
<script type="text/javascript">
apiKey: "{{ facebook_apikey }}",
status: true,
cookie: true,
xfbml: true
reinbach /
Created Sep 10, 2011 — forked from pokstad/
Redis session store backend for
import redis
import web
class RedisStore(web.session.Store):
"""Store for saving a session in redis:
import rediswebpy
session = web.session.Session(app, rediswebpy.RedisStore(), initializer={'count': 0})