Skip to content

Instantly share code, notes, and snippets.

View jimklo's full-sized avatar

Jim Klo jimklo

View GitHub Profile
#
# SimpleSite - Pylons testing environment configuration
#
# The %(here)s variable will be replaced with the parent directory of this file
#
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports
#email_to = you@yourdomain.com
smtp_server = localhost
@jimklo
jimklo / gist:1076424
Created July 11, 2011 18:16
CouchDB Test Suite Log
{
"_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
jimklo / learning-registry vhost
Created July 11, 2011 18:22
CouchDB _utils redirecting to port 80
jklo$ curl -i -X GET "http://ec2-174-129-59-231.compute-1.amazonaws.com:5984/_utils"
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Mon, 11 Jul 2011 18:20:59 GMT
Connection: keep-alive
Location: http://ec2-174-129-59-231.compute-1.amazonaws.com/_utils/
Content-Length: 0
@jimklo
jimklo / linked-json-error.json
Created August 27, 2011 00:17
LR Publish Resource Data with Linked Payload Error
{"document_results": [{"OK": false, "error": "<br />\"'unicode' object has no attribute 'keys'\"<br />{ u'TOS': { u'submission_TOS': u'http://www.learningregistry.org/tos/cc0/v0-5/'},<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'jim.klo@sri.com',<br /> u'owner': u'jim.klo@sri.com',<br /> u'submitter': u'jim.klo@sri.com',<br /> u'submitter_type': u'agent'},<br /> u'keys': [u'JMETER', u'JMETER_JSON', u'lr-test-data'],<br /> u'payload_locator': u'https://sites.google.com/site/learningregistrytestdata/files/json-linked.json?attredirects=0&d=1',<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'https://sites.google.com/site/learningregistrytestdata/'}<br />"}], "OK": true}
@jimklo
jimklo / attached-json-error.json
Created August 27, 2011 00:32
LR Publish Resource Data with Attached Payload Error
{"document_results": [{"OK": false, "error": "<br />\"Key '_attachments' not present in model spec.\"<br />{ u'TOS': { u'submission_TOS': u'http://www.learningregistry.org/tos/cc0/v0-5/'},<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
// 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
jimklo / production.ini
Created January 9, 2012 19:17
Learning Registry configuration file
[app:main]
use = config:development.ini
[loggers]
keys = root, routes, lr
[formatter_generic]
datefmt = %H:%M:%S
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
@jimklo
jimklo / gist:1597661
Created January 12, 2012 00:18
PyF install issues
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:
@jimklo
jimklo / node_harvester.py
Created January 14, 2012 02:44
PyF Help
from pyf.componentized.components import Producer
from pyf.componentized import ET
import logging
from pyf.componentized.configuration.keys import SimpleKey, RepeatedKey,\
CompoundKey
from pyf.componentized.configuration.fields import InputField
log = logging.getLogger(__name__)
@jimklo
jimklo / rake.log
Created February 22, 2012 00:03
CouchDB compile error on OS X Snow Leopard
Here's the command I executed:
rake plugins="https://github.com/couchbase/geocouch.git origin/couchdb1.1.x" git="git://git.apache.org/couchdb.git tags/1.1.1" install=/Applications/CouchDB/dependencies couchdb_build=/Applications/CouchDB/1.1.1