Skip to content

Instantly share code, notes, and snippets.

View l34marr's full-sized avatar

TsungWei Hu l34marr

View GitHub Profile
@simonedeponti
simonedeponti / utils.py
Last active August 29, 2015 14:01
Get all interfaces and behaviors
from zope.schema import getFields
from zope.interface import providedBy
from zope.interface import implementedBy
from zope.component import getUtility
from zope.component import queryUtility
from plone.behavior.interfaces import IBehavior
from plone.behavior.interfaces import IBehaviorAssignable
from plone.dexterity.interfaces import IDexterityFTI
from plone.dexterity.utils import resolveDottedName
@mcdonc
mcdonc / gist:3921658
Created October 20, 2012 01:52
ZPT wrapper for tidy-html
#!/usr/bin/env python
# tidy_pt_wrapper lint wrapper for Chameleon and ZPT templates. Written to
# run under SublimeLinter, but will probably work elsewhere.
#
# When run from the command line it invokes tidy-html5 and scrapes and
# modifies its stderr output when acting as a filter, e.g.
#
# tidy_pt_wrapper < some.pt
#