Skip to content

Instantly share code, notes, and snippets.

@optilude
optilude / Default (OS X).sublime-keymap - User
Created August 8, 2011 19:26
A version of the Sublime Text 2 plugin at http://www.sublimetext.com/forum/viewtopic.php?f=5&t=2260&start=0 that makes for TextMate-like clipboard history
[
{ "keys": ["super+x"], "command": "clipboard_history_cut" },
{ "keys": ["super+c"], "command": "clipboard_history_copy" },
{ "keys": ["super+v"], "command": "clipboard_history_paste" },
{ "keys": ["super+shift+v"], "command": "clipboard_history_previous_and_paste" },
{ "keys": ["super+pagedown"], "command": "clipboard_history_next" },
{ "keys": ["super+pageup"], "command": "clipboard_history_previous" },
{ "keys": ["super+alt+ctrl+v"], "command": "clipboard_history_choose_and_paste" }
@optilude
optilude / buildout.cfg
Created August 11, 2011 19:57
Illustrate use of eggs
# Test buildout
# Put this file in a directory as buildout.cfg.
# In the same directory, run:
#
# $ wget "http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py"
# $ python bootstrap.py
# $ bin/buildout
#
[buildout]
@optilude
optilude / gist:1527606
Created December 28, 2011 11:20
Basic Python package in virtualenv
$ easy_install -U virtualenv
# Create a sandbox
$ virtualenv --no-site-packages myenv
$ cd myenv
# Install Paste Script
$ bin/pip install PasteScript

Zope secrets

This guide will attempt to explain some of Zope's internals. It may be useful for debugging purposes, or simply to better understand how Zope works.

If you only want to know how to use the APIs and features described below, you are probably better served reading the Zope Developer's Guide.

Zope secrets

This guide will attempt to explain some of Zope's internals. It may be useful for debugging purposes, or simply to better understand how Zope works.

The guide pertains to Zope 2.13.

If you only want to know how to use the APIs and features described below,

Zope secrets

This guide will attempt to explain some of Zope's internals. It may be useful for debugging purposes, or simply to better understand how Zope works.

The guide pertains to Zope 2.13.

If you only want to know how to use the APIs and features described below,

Zope secrets

This guide will attempt to explain some of Zope's internals. It may be useful for debugging purposes, or simply to better understand how Zope works.

The guide pertains to Zope 2.13.

If you only want to know how to use the APIs and features described below,

@optilude
optilude / buildout.cfg
Created January 1, 2012 11:25
Plone 4.1 and Zope 2.13 WSGI setup
# This buildout.cfg should work to run Zope as a WSGI process
[buildout]
extends = http://dist.plone.org/release/4.1-latest/versions.cfg
parts = instance paster wsgiconfig
[instance]
recipe = plone.recipe.zope2instance
eggs =
Plone
Index: src/infrae/wsgi/publisher.py
===================================================================
--- src/infrae/wsgi/publisher.py (revision 49248)
+++ src/infrae/wsgi/publisher.py (working copy)
@@ -19,6 +19,7 @@
from zope.component import queryMultiAdapter
from zope.event import notify
from zope.interface import implements
+from zope.interface import directlyProvides, directlyProvidedBy
from zope.site.hooks import getSite
@optilude
optilude / wsgi-zpublisher-events.diff
Created January 1, 2012 19:04
Zope 2.13 patch for WSGI ZPublisher events
diff --git a/src/ZPublisher/WSGIPublisher.py b/src/ZPublisher/WSGIPublisher.py
index 5d5b702..02bf7e2 100644
--- a/src/ZPublisher/WSGIPublisher.py
+++ b/src/ZPublisher/WSGIPublisher.py
@@ -13,6 +13,7 @@
""" Python Object Publisher -- Publish Python objects on web servers
"""
from cStringIO import StringIO
+import sys
import time