This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This local.ini, gets me the error below: | |
---------------------------------------- | |
; CouchDB Configuration Settings | |
; Custom settings should be made in this file. They will override settings | |
; in default.ini, but unlike changes made to default.ini, this file won't be | |
; overwritten on server upgrade. | |
[couchdb] | |
;max_document_size = 4294967296 ; bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function beforeRender() | |
{ | |
if ($this->params['url']['ext'] == 'html') { | |
$this->viewPath .= '/xml'; | |
$this->layoutPath = 'xml'; | |
} | |
$this->RequestHandler->respondAs($this->layoutPath); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT /testtest/html5 HTTP/1.0 | |
Content-Type: application/json | |
{ | |
"id": "5", | |
"category_id": "0", | |
"title": "A bunch of content", | |
"keywords": null, | |
"description": null, | |
"content": "<p>This is<\/p>\n<p>a content item<\/p>\n<p>with spaces<\/p>\n<p>and a<\/p>\n<p>whole<span class=\"pagebreak\"><\/span><\/p>\n<p>bunch<\/p>\n<p>of<\/p>\n<p>content<\/p>\n<p>at<\/p>\n<p>least<\/p>\n<p>vertically<\/p>\n<p>though<\/p>\n<p>not horizontally<\/p>\n<p>exactly...<\/p>\n<p>oh<\/p>\n<p>well<\/p>\n<p>really<\/p>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{badmatch,{error,eacces}}, | |
[{couch_file,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"A representation of an event", | |
"type":"object", | |
"properties":{ | |
"dtstart":{"format":"date-time","type":"string","description":"Event starting time","required":true}, | |
"summary":{"type":"string","required":true}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a bash script intended for use in a Mac OS X Automator Service script. | |
# Add the script below in a "Run Shell Script" action set to "/bin/bash" in Automator. | |
# Known issues (several...) are at the bottom. | |
# Edit this line to your CouchDB instance and a db you can write to. | |
couch="http://{replaceme}.couchone.com/{metoo}/" | |
for f in "$@" | |
do | |
filename=${f##*/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(doc) { | |
// TODO: can we put this someplace "global"? | |
var max_posts = 10; | |
if (doc.type == 'page') { | |
var urlParts = doc.url.split('/'); | |
for (var i in doc.page_items) { | |
for (var n in doc.page_items[i]) { | |
if (doc.page_items[i][n].posts != undefined) { | |
var post_count = 0; | |
for (var post in doc.page_items[i][n].posts) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(head, req) { | |
var row; | |
provides('html', | |
function() { | |
var page = {items:[],copyright:'BigBlueHat'}; | |
var posts = []; | |
while(row = getRow()) { | |
log(row); | |
} // end while | |
log(page.items); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Copyright 2011 Couchbase, Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT Licensed - http://choosealicense.com/licenses/mit/ | |
function dateToArray(ts, length, utc) { | |
var length = length || 6, | |
d = (typeof ts === 'number' ? new Date(ts) : new Date()), | |
utc = Boolean(utc) || true; | |
if (utc) { | |
return [d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), | |
d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), | |
d.getUTCMilliseconds()] | |
.slice(0, length); |
OlderNewer