Skip to content

Instantly share code, notes, and snippets.

View BigBlueHat's full-sized avatar
🎩
building Web things

BigBlueHat BigBlueHat

🎩
building Web things
View GitHub Profile
@BigBlueHat
BigBlueHat / feed.atom
Created February 27, 2015 20:26
Hypothes.is Stream as Atom 1.0 Feed document
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Hypothes.is Stream</title>
<subtitle>The Web. Annotated</subtitle>
<link href="http://hypothes.is/stream.atom" rel="self" />
<link href="http://hypothes.is/stream" />
<id>http://hypothes.is/stream</id>
<updated>2014-09-18T21:43:16.353744+00:00</updated>
@BigBlueHat
BigBlueHat / index.html
Last active August 29, 2015 14:16
RDFa from Hypothes.is Annotation generator thing
<html>
<head>
<title>Hypothes.is Annotation in RDFa</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/mustache.js/2.1.2/mustache.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/superagent/1.2.0/superagent.min.js"></script>
<script src="index.js"></script>
</head>
<body>
</body>
@BigBlueHat
BigBlueHat / setup.md
Last active August 29, 2015 14:21
Windows Setup
module.exports.getConversationsForUser = function (user, cb) {
db.query(
function (doc) {
if (doc.author) {
emit(doc.author)
}
},
{include_docs: true, key: user.userId}
).then(function (response) {
// response.doc should have the whole doc
@BigBlueHat
BigBlueHat / README.md
Last active August 29, 2015 14:25 — forked from anonymous/README.md
JSON-LD Playground: Web Annotation Context for Hypothesis

Web Annotation Context for Hypothesis

This gist was automatically created by the JSON-LD Playground. You can see it loaded there by visiting:

http://json-ld.org/playground#/gist/<gist id>
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
function beforeRender()
{
if ($this->params['url']['ext'] == 'html') {
$this->viewPath .= '/xml';
$this->layoutPath = 'xml';
}
$this->RequestHandler->respondAs($this->layoutPath);
}
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>",
{{badmatch,{error,eacces}},
[{couch_file,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}
@BigBlueHat
BigBlueHat / gist:604454
Created September 30, 2010 11:53
JSON Schema of an Event
{"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},