Skip to content

Instantly share code, notes, and snippets.


Nathan Van Gheem vangheem

View GitHub Profile
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 Aug 29, 2015
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
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 Aug 27, 2013
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