README is empty
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
2015-02-10 14:29:35,567 [21607] [h.views:ERROR] Uncaught exception generating response. | |
Traceback (most recent call last): | |
File "/Users/byoung/dev/hypothesis/h/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween | |
response = handler(request) | |
File "/Users/byoung/dev/hypothesis/h/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 92, in tm_tween | |
reraise(*exc_info) | |
File "/Users/byoung/dev/hypothesis/h/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 73, in tm_tween | |
response = handler(request) | |
File "/Users/byoung/dev/hypothesis/h/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request | |
response = view_callable(context, request) |
Originally composed as IRC messages by the venerable rnewson
.
In Apache CouchDB 2.0, there's no such notion of committed. It's AP not CP.
What happens is a write is applied to N nodes (default is 3) and a 201 response is returned when the first W nodes (default is 2) respond with success. A 202 response is sent if < W writes (but > 0) were made. Every node, on receiving an update, does an automatic replication to the others (using an internal, faster, system than _replicate).
Documents are read from N nodes that hold a copy, and a 200 response is sent (and the document) when the first R nodes respond with the same revision.
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
var request = require('superagent'); | |
var PouchDB = require('pouchdb'); | |
var db = new PouchDB('github-hypothesis'); | |
request | |
.get('https://api.github.com/repos/hypothesis/h/stats/contributors') | |
.end(function(res) { | |
if (res.ok) { | |
console.log(res.body); | |
} |
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
var request = require('superagent'); | |
var regex = /\:([a-z_]*)\:/g; | |
var paragraph = '\ | |
This is a paragraph of text contianing :coffee:, \ | |
:beer:, :tea:, and other :smiley_cat: emoji. \ | |
'; | |
request | |
.get('https://api.github.com/emojis') | |
.end(function(res) { |
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 2014 The Hypothes.is Project | |
* @license MIT | |
* @author BigBlueHat <bigbluehat@hypothes.is> | |
**/ | |
var mustache = require('mustache'); | |
var request = require('superagent'); | |
var style = '<style>\n\ | |
aside {border: 1px solid darkgray;margin: 2em;padding:1em;background: #efefef;}\n\ |
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
// existence "tests" for | |
// https://github.com/hypothesis/h/issues/1207 | |
// using | |
// https://hypothes.is/api/annotations/KLUGtTMjTUSOPVvACd-dNA | |
// for reference. | |
var pointer = require('json-pointer'); | |
var obj = | |
{ |
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
var tabs = require('sdk/tabs'); | |
function onOpen(tab) { | |
console.log(tab.url + " is open"); | |
tab.on("ready", function() {console.log(tab.url + " is ready")}); | |
tab.on("loaded", function() {console.log(tab.url + " is loaded")}); | |
tab.on("pageshow", function() {console.log(tab.url + " is pageshown")}); | |
tab.on("activate", function() {console.log(tab.url + " is activate")}); | |
tab.on("deactivate", function() {console.log(tab.url + " is deactivate")}); | |
tab.on("close", function() {console.log(tab.url + " is close")}); |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id": "http://annotatorjs.org/schema.json#", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"annotator_schema_version": { |
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
data = {"years":{"rows": [{"value": 3047, "key": [2014], "year": 2014}, {"months": {"rows": [{"value": 554, "key": [2013, 12], "month": 12}, {"value": 467, "key": [2013, 11], "month": 11}, {"value": 503, "key": [2013, 10], "month": 10}, {"value": 241, "key": [2013, 9], "month": 9}, {"value": 428, "key": [2013, 8], "month": 8}, {"value": 442, "key": [2013, 7], "month": 7}, {"value": 434, "key": [2013, 6], "month": 6}, {"value": 730, "key": [2013, 5], "month": 5}, {"value": 456, "key": [2013, 4], "month": 4}, {"value": 1118, "key": [2013, 3], "month": 3}, {"value": 387, "key": [2013, 2], "month": 2}, {"value": 489, "key": [2013, 1], "month": 1}]}, "value": 6249, "key": [2013], "year": 2013}, {"value": 4407, "key": [2012], "year": 2012}]}}; | |
template = '{{#years}}<ul> {{#rows}} <li><a href="/{{year}}/?q={{#qs}}{{q}}{{/qs}}">{{year}}</a> ({{value}}) {{^months}} - no months {{/months}}{{> months}} </li> {{/rows}}</ul>{{/years}}'; | |
months = '{{#months}}<ul> {{#rows}} <li><a href="/{{year}}/{{month}}/?q={{# |