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 / index.html
Created November 29, 2016 21:36
Apache Annotator (incubating) home page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>Apache Annotator (incubating)</title>
<link rel="stylesheet" href="http://semantic-ui.com/dist/semantic.min.css" />
</head>
@BigBlueHat
BigBlueHat / hypothesis.md
Created September 9, 2016 20:35
Hypothes.is API Blueprint [DRAFT]
@BigBlueHat
BigBlueHat / README.md
Created July 15, 2016 18:15
Test Multiple Inbound Header Handling in wptserve (for Python)

Test Multiple Inbound Header Handling in wptserve (for Python)

Wirking on exploring this issue: w3c/wptserve#84

Usage

$ pip install wptserve
$ python test.py
@BigBlueHat
BigBlueHat / resulting-nquads-of-all-three.ttl
Created April 18, 2016 20:04
Web Annotation First Example Comparison - these are all the same
<http://example.org/anno1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/oa#Annotation> .
<http://example.org/anno1> <http://www.w3.org/ns/oa#hasBody> <http://example.org/post1> .
<http://example.org/anno1> <http://www.w3.org/ns/oa#hasTarget> <http://example.com/page1> .
@BigBlueHat
BigBlueHat / index.js
Created December 1, 2015 19:00
requirebin sketch
var seek = require('dom-seek');
var text = 'ipsum';
// Find the text.
var offset = document.body.textContent.indexOf(text);
var length = text.length
// Create a NodeIterator.
var iter = document.createNodeIterator(document.body, NodeFilter.SHOW_TEXT);
@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>
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 / setup.md
Last active August 29, 2015 14:21
Windows Setup
@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 / 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>