Skip to content

Instantly share code, notes, and snippets.

curl --head -k https://hypothes.is
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 14 Apr 2015 16:36:57 GMT
curl --head -k https://hypothes.is/blog
HTTP/1.1 502 Bad Gateway
Server: nginx
Date: Tue, 14 Apr 2015 16:37:03 GMT
Command "/home/jon/.virtualenvs/h/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-sRqn9q/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vhLhiu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/jon/.virtualenvs/h/include/site/python2.7/cffi" failed with error code 1 in /tmp/pip-build-sRqn9q/cffi
make: *** [deps] Error 1
@judell
judell / gist:b45a77f789dd78a6a527
Last active August 29, 2015 14:19
reset email template
username = 'judell'
link = 'http://hypothes.is/ACTIVATION'
code = '12345'
domain = 'https://hypothes.is'
emailtext = """Hello {username},
Someone requested resetting your password. If it was
you, please reset your password with this reset code:
@judell
judell / gist:a63c392c4b4f64776fb9
Created April 29, 2015 22:34
tag concordance
import json
f = open('c:\\users\\jon\\all_annos.json','r')
s = f.read().decode('utf-8')
j = json.loads(s)
s = ''
all_tags = {}
@judell
judell / gist:f794f719a5240de9f939
Created April 29, 2015 22:35
all annotations
import json, urllib2, re
offset = 0
limit = 200
more = True
def search():
global offset, limit, more
h_url = 'https://hypothes.is/api/search?limit=%d&offset=%d' % ( limit, offset)
s = urllib2.urlopen(h_url).read()
@judell
judell / gist:b287a63867e4123aded0
Created May 7, 2015 00:35
hypothesis ambiguity analysis
Annotations on these URLs share a normalized URL but have no other metadata links:
thedeadcanary.wordpress.com/2014/05/11/song-of-myself
https://thedeadcanary.wordpress.com/2014/05/11/song-of-myself/
id: jk7WvHAQTmm5I3neJLp2tw updated: 2015-01-14T03:00:45.400846+00:00
Annotations on these URLs share a normalized URL but have no other metadata links:
scalar.usc.edu/works/deterrence/the-deterrence-gap
http://scalar.usc.edu/works/deterrence/the-deterrence-gap
id: 1qovOTRTQQa6htuXLFB0wA updated: 2013-11-14T21:16:14.452675+00:00
@judell
judell / gist:d97c135f540811d65f62
Created June 1, 2015 16:56
create annotation
import requests,json
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
class Hypothesis:
import json, traceback, requests, types
from collections import defaultdict
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
class HypothesisUtils:
https://books.google.com/books?id=0oJEBQAAQBAJ&pg=PT117&lpg=PT117&dq=Dorothy+Vaneman&source=bl&ots=qE6gfXQL4v&sig=1ZnhfVlwmVGo2JWEGkBthw_OhVc&hl=en&sa=X&ei=b_gtVbL3N8uyoQS5-YDoDw&ved=0CEkQ6AEwCw (2015-04-15T05:42:10)
https://books.google.com/books/about/The_Skylark_of_Space.html?id=0oJEBQAAQBAJ
http://www.homeopathicassociates.com/conditions-homeopathic-treatment/ (2015-02-11T20:12:51)
http://www.homeopathicassociates.com/?p=12313
http://ecdaproject.org/commons/ (2015-05-07T19:49:59)
http://wp.me/P5mdo0-Ch
<html>
<head>
<title>urls recently annotated with hypothesis</title>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"></script>
<style>
body { margin-left: .5in; margin-top:.25in; font-family:verdana; word-break:break-word; font-size:11pt }
a { color: gray }
#widget { width: 50%; padding:8px; border-width:thin; border-style:solid }
</style>
</head>