Skip to content

Instantly share code, notes, and snippets.

View nutjob4life's full-sized avatar
💭
Contemplating next hair color

Sean Kelly nutjob4life

💭
Contemplating next hair color
View GitHub Profile
File "/Users/kelly/.buildout/eggs/z3c.relationfield-0.6.2-py2.7.egg/z3c/relationfield/event.py", line 82, in updateRelations
catalog.unindex(rel)
File "/Users/kelly/.buildout/eggs/zc.relation-1.0-py2.7.egg/zc/relation/catalog.py", line 546, in unindex
self.unindex_doc(self._relTools['dump'](rel, self, {}))
File "/Users/kelly/.buildout/eggs/zc.relation-1.0-py2.7.egg/zc/relation/catalog.py", line 556, in unindex_doc
self._remove(relToken, tokens, data['name'])
File "/Users/kelly/.buildout/eggs/zc.relation-1.0-py2.7.egg/zc/relation/catalog.py", line 621, in _remove
data = dataset[key]
KeyError: <class 'plone.directives.form.schema.Schema'>
class X(object):
def __init__(self, value):
self.value = value
def __cmp__(self, other):
print 'I am %x, comparing my %d with other %x %d' % (id(self), self.value, id(other), other.value)
return cmp(self.value, other.value)
a = [X(2), X(1), X(3)]
X(1) in a
plone01 216 > hostname
plone01.sixfeetup.com
plone01 217 > date -u
Fri Jul 12 21:50:47 UTC 2013
plone01 218 > telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
Host: plone.org
@nutjob4life
nutjob4life / gist:5467262
Created April 26, 2013 13:09
The buildout
[buildout]
extends = http://dist.plone.org/release/4.3-latest/versions.cfg
parts = plone
[plone]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8081
# environment-vars = TZ America/New_York
>>> app.ZopeTime()
DateTime('2013/04/26 08:07:53.982604 GMT-5')
>>> import os
>>> os.environ['TZ'] = 'America/Los_Angeles'
>>> app.ZopeTime()
DateTime('2013/04/26 06:08:34.651844 GMT-5')
>>>
Starting debugger (the name "app" is bound to the top-level Zope object)
2013-04-26 08:07:39 WARNING ZODB.blob (19647) Blob dir /private/tmp/1/var/blobstorage/ has insecure mode setting
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named globalrequest
>>> app.ZopeTime()
DateTime('2013/04/26 08:07:49.829079 GMT-5')
>>> import os
>>> os.environ['TZ'] = 'America/New_York'
>>> app.ZopeTime()
@nutjob4life
nutjob4life / gist:5327918
Created April 6, 2013 22:31
nutjob's buildout.cfg
[buildout]
extends =
conf/database.cfg
conf/develop.cfg
[filestorage]
source = [email protected]:/srv/plone.org/var/filestorage/Data.fs
[filestorage2]
source = [email protected]:/srv/plone.org/var/filestorage/CatalogData.fs
* About to connect() to dist.plone.org port 80 (#0)
* Trying 108.162.197.83...
* connected
* Connected to dist.plone.org (108.162.197.83) port 80 (#0)
> GET /release/4.3-pending/versions.cfg HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: dist.plone.org
> Accept: */*
>
< HTTP/1.1 200 OK
@nutjob4life
nutjob4life / gist:3363394
Created August 15, 2012 20:36
$portal_url/@@updateRDF
class RDFUpdater(grok.View):
# see template in rdfupdater_templates/rdfupdater.pt
grok.context(INavigationRoot)
grok.name('updateRDF')
grok.require('cmf.ManagePortal')
def update(self):
self.request.set('disable_border', True)
...
@nutjob4life
nutjob4life / gist:3184956
Created July 26, 2012 22:23
Works for me?
fatalii 209 % date
Thu Jul 26 17:20:56 CDT 2012
fatalii 210 % sw_vers
ProductName: Mac OS X
ProductVersion: 10.8
BuildVersion: 12A269
fatalii 211 % curl -LO 'https://raw.github.com/pypa/virtualenv/master/virtualenv.py'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed