Skip to content

Instantly share code, notes, and snippets.


Jim Klo jimklo

View GitHub Profile
View gist:1057182
# SimpleSite - Pylons testing environment configuration
# The %(here)s variable will be replaced with the parent directory of this file
debug = true
# Uncomment and replace with the address which should receive any error reports
#email_to =
smtp_server = localhost
jimklo / gist:1076424
Created Jul 11, 2011
CouchDB Test Suite Log
View gist:1076424
"_id": "6aa323ad0e95c49b0f6ac9c0b36ff513",
"_rev": "1-beb08a81570c13472e9b048b09a11d1d",
"summary": "72 of 72 test(s) run, 7 failures (332596 ms) ",
"platform": {
"browser": "safari",
"version": "534.30"
"timestamp": 1310408078105,
"timezone": 420,
jimklo / learning-registry vhost
Created Jul 11, 2011
CouchDB _utils redirecting to port 80
View learning-registry vhost
jklo$ curl -i -X GET ""
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Mon, 11 Jul 2011 18:20:59 GMT
Connection: keep-alive
Content-Length: 0
jimklo / linked-json-error.json
Created Aug 27, 2011
LR Publish Resource Data with Linked Payload Error
View linked-json-error.json
{"document_results": [{"OK": false, "error": "<br />\"'unicode' object has no attribute 'keys'\"<br />{ u'TOS': { u'submission_TOS': u''},<br /> u'active': True,<br /> u'doc_type': u'resource_data',<br /> u'doc_version': u'0.21.0',<br /> u'identity': { u'curator': u'',<br /> u'owner': u'',<br /> u'submitter': u'',<br /> u'submitter_type': u'agent'},<br /> u'keys': [u'JMETER', u'JMETER_JSON', u'lr-test-data'],<br /> u'payload_locator': u'',<br /> u'payload_placement': u'linked',<br /> u'payload_schema': [u'JMETER_JSON'],<br /> u'resource_data_type': u'metadata',<br /> u'resource_locator': u''}<br />"}], "OK": true}
jimklo / attached-json-error.json
Created Aug 27, 2011
LR Publish Resource Data with Attached Payload Error
View attached-json-error.json
{"document_results": [{"OK": false, "error": "<br />\"Key '_attachments' not present in model spec.\"<br />{ u'TOS': { u'submission_TOS': u''},<br /> u'_attachments': { u'lorem.json': { u'content_type': u'application/json',<br /> u'data': u'ewogInF1ZXJ5IjogewogICJjb3VudCI6IDEsCiAgImNyZWF0ZWQiOiAiMjAxMS0wOC0yNlQyMTo0\\nOTozNloiLAogICJsYW5nIjogImVuLVVTIiwKICAiZGlhZ25vc3RpY3MiOiB7CiAgICJwdWJsaWNs\\neUNhbGxhYmxlIjogInRydWUiLAogICAidXJsIjogWwogICAgewogICAgICJleGVjdXRpb24tc3Rh\\ncnQtdGltZSI6ICIwIiwKICAgICAiZXhlY3V0aW9uLXN0b3AtdGltZSI6ICIxMzUiLAogICAgICJl\\neGVjdXRpb24tdGltZSI6ICIxMzUiLAogICAgICJwcm94eSI6ICJERUZBVUxUIiwKICAgICAiY29u\\ndGVudCI6ICJodHRwOi8vc2Nvb3RlcmxhYnMuY29tL3lxbC9sb3JlbS5pcHN1bS54bWwiCiAgICB9\\nLAogICAgewogICAgICJleGVjdXRpb24tc3RhcnQtdGltZSI6ICIxMzkiLAogICAgICJleGVjdXRp\\nb24tc3RvcC10aW1lIjogIjM0OSIsCiAgICAgImV4ZWN1dGlvbi10aW1lIjogIjIxMCIsCiAgICAg\\nInByb3h5IjogIkRFRkFVTFQiLAogICAgICJjb250ZW50IjogImh0
View alignment.js
// a library for resource_data validation
exports.init = function (newDoc, oldDoc, userCtx, secObj) {
var a = {};
a.is_resource_data = function() {
return newDoc.doc_type === "resource_data_distributable" && newDoc.resource_data && newDoc.resource_locator;
a.has_dct_conformsTo = function() {
try {
jimklo / production.ini
Created Jan 9, 2012
Learning Registry configuration file
View production.ini
use = config:development.ini
keys = root, routes, lr
datefmt = %H:%M:%S
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
jimklo / gist:1597661
Created Jan 12, 2012
PyF install issues
View gist:1597661
I'm new to PyF... it looks like great framework to build workflow applications.
I'm running into an issue which I'm not quite sure how to solve before I give up on PyF...
Following the install guide, I've setup a virtualenv, and activated it... then:
easy_install -UZ pyf[fullstack]
After some time easy_install seems to fail:
from pyf.componentized.components import Producer
from pyf.componentized import ET
import logging
from pyf.componentized.configuration.keys import SimpleKey, RepeatedKey,\
from pyf.componentized.configuration.fields import InputField
log = logging.getLogger(__name__)
jimklo / rake.log
Created Feb 22, 2012
CouchDB compile error on OS X Snow Leopard
View rake.log
Here's the command I executed:
rake plugins=" origin/couchdb1.1.x" git="git:// tags/1.1.1" install=/Applications/CouchDB/dependencies couchdb_build=/Applications/CouchDB/1.1.1