Skip to content

Instantly share code, notes, and snippets.


Nathan Van Gheem vangheem

View GitHub Profile
vangheem /
Last active September 11, 2015 16:12
import zope.interface
import zope.schema.interfaces
import z3c.form.interfaces
import z3c.form.browser.textarea
import z3c.form.widget
from import RelatedItemsWidget
class MyRelatedItemsWidget(RelatedItemsWidget):
vangheem / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
vangheem / gist:2c625d89c33c1010662c
Created June 26, 2014 13:26
alternative renderTiles
View gist:2c625d89c33c1010662c
def renderTiles(request, tree):
copy from blocks minus ESI stuff
site = getSite()
siteUrl = site.absolute_url()
root = tree.getroot()
except AttributeError:
vangheem / gist:6358511
Created August 27, 2013 20:11
archetypes note patch
View gist:6358511
import transaction
from copy import deepcopy
from cgi import escape
from cStringIO import StringIO
from logging import ERROR
from types import ClassType, FileType, StringType, UnicodeType
from zope.contenttype import guess_content_type
from zope.i18n import translate