Skip to content

Instantly share code, notes, and snippets.

// from local.ini
[couch_httpd_auth]
authentication_db = users
require_valid_user = true
// http://localhost:5984/users/_design/_auth/_view/users
{"total_rows":1,"offset":0,"rows":[
{"id":"users","key":"stefano","value":{"password_sha":"EwPfA3e1xccq6zn5M0qUp6141hU=","roles":["_reader","_writer","_admin"],"seed":"1234"}}
]}
Barista.Template.teamMember = function(el, data) {
$.each(data.rows, function(i, member) {
el.clone().insertBefore(el).removeClass('t').removeClass('t-teamMember').text(member.name);
});
};
diff --git a/__init__.py b/__init__.pyindex 66f0f05..57574d6 100644
--- a/__init__.py
+++ b/__init__.py
@@ -5,7 +5,7 @@ import re
import sys
from exceptions import *
from utils import *
-from lxml import etree
+from xml.etree import ElementTree
from urllib import urlencode
#!/usr/bin/env coffee
# The URL of the web site to make crawlable
URL: 'http://localhost'
# Time to wait for all the scripts to run, in ms
DELAY: 3000
# Script to run to clean up the markup before serializing
CLEANUP: (window) ->
;;; haml-mode.el --- Major mode for editing Haml files
;; Copyright (c) 2007, 2008 Nathan Weizenbaum
;; Author: Nathan Weizenbaum
;; URL: http://github.com/nex3/haml/tree/master
;; Version: 1.0
;; Keywords: markup, language
;;; Commentary:
jQuery.ajax({
type: "PUT",
url: "http://key:[email protected]:5984/staging/doc1",
data: '{}',
contentType: "application/json",
success: function (data, textStatus, XMLHttpRequest) {
alert("ok " + data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("ko"); // {}, "error", undefined
git clone git://github.com/cloudant/opencore.git
conn = S3Connection(amazon_ID, amazon_KEY)
bucket = conn.get_bucket(bucketname)
k = Key(Bucket)
k.set_contents_from_filename(filename)
server = Server('http://user:[email protected])
db = server.get_or_create(dbname)
doc = db[docid]
db.put_attachment(doc, file(filename))
import couchdbkit, boto