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
@nutjob4life
nutjob4life / gist:2889949
Created June 7, 2012 16:41
Plone 4.1.5 + plone.app.dexterity 1.2.1 = boom
2012-06-07 11:40:24 INFO ZServer HTTP server started at Thu Jun 7 11:40:24 2012
Hostname: 0.0.0.0
Port: 8080
2012-06-07 11:40:25 WARNING SecurityInfo Conflicting security declarations for "setText"
2012-06-07 11:40:25 WARNING SecurityInfo Class "ATTopic" had conflicting security declarations
/Users/kelly/.buildout/eggs/Products.ResourceRegistries-2.0.9-py2.6.egg/Products/ResourceRegistries/tools/BaseRegistry.py:7: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from md5 import md5
2012-06-07 11:40:26 WARNING ZODB.blob (909) Blob dir /private/tmp/fuck/var/blobstorage/ has insecure mode setting
/Users/kelly/.buildout/eggs/five.grok-1.2.0-py2.6.egg/five/grok/meta.py:29: DeprecationWarning: protectClass is deprecated. Please import from AccessControl.security
from Products.Five.security import protectClass, protectName
@nutjob4life
nutjob4life / gist:2919529
Created June 12, 2012 19:14
Plone 4.1.3
[buildout]
extends = http://dist.plone.org/release/4.1.3/versions.cfg
parts = plone
[plone]
recipe = plone.recipe.zope2instance
eggs =
Plone
Pillow
user = admin:admin
@nutjob4life
nutjob4life / gist:2919531
Created June 12, 2012 19:14
Plone 4.1.4
[buildout]
extends = http://dist.plone.org/release/4.1.4/versions.cfg
parts = plone
[plone]
recipe = plone.recipe.zope2instance
eggs =
Plone
Pillow
user = admin:admin
@nutjob4life
nutjob4life / gist:3122872
Created July 16, 2012 13:59
Sample ldapmodify
dn: uid=martior,ou=people,dc=plone,dc=org
changetype: modify
add: objectclass
objectclass: github-user
add: github-username
github-username: awesome-koder
@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
@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)
...
* 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:5327918
Created April 6, 2013 22:31
nutjob's buildout.cfg
[buildout]
extends =
conf/database.cfg
conf/develop.cfg
[filestorage]
source = nutjob@plone.org:/srv/plone.org/var/filestorage/Data.fs
[filestorage2]
source = nutjob@plone.org:/srv/plone.org/var/filestorage/CatalogData.fs
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()
>>> 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')
>>>