Skip to content

Instantly share code, notes, and snippets.

View edsu's full-sized avatar

Ed Summers edsu

View GitHub Profile
The primary means by which architectural styles induce simplicity is by applying the
principle of separation of concerns to the allocation of functionality within
components. If functionality can be allocated such that the individual components are
substantially less complex, then they will be easier to understand and implement.
Likewise, such separation eases the task of reasoning about the overall architecture. I
have chosen to lump the qualities of complexity, understandability, and verifiability
under the general property of simplicity, since they go hand-in-hand for a network
based system.
Rob Laird (ice hockey) -> Canada -> United States ->
List of Diplomatic Missions in the United States ->
United States Department of State -> United States Secretary of State ->
Hillary Rodham Clinton -> United_States_diplomatic_cables_leak ->
Julian Assange ->
http://en.wikipedia.org/wiki/Rerebrace ->
http://en.wikipedia.org/wiki/Medieval ->
http://en.wikipedia.org/wiki/Medieval_music ->
http://en.wikipedia.org/wiki/20th-century_classical_music ->
http://en.wikipedia.org/wiki/Category:20th-century_classical_music ->
http://en.wikipedia.org/wiki/Category:Musical_eras ->
http://en.wikipedia.org/wiki/Category:Music_history ->
http://en.wikipedia.org/wiki/Category:Music_by_date ->
http://en.wikipedia.org/wiki/Category:Music_by_decade ->
http://en.wikipedia.org/wiki/1980s_in_music ->
>>> g = rdflib.Graph()
>>> g.add((rdflib.URIRef('urn:uuid:0031'), rdflib.URIRef('http://example.com/foo'), rdflib.Literal('bar')))
>>> print g.serialize(format='nt')
<urn:uuid:0031> <http://example.com/foo> "bar" .
>>> print g.serialize(format='turtle')
@prefix ns1: <http://example.com/> .
<urn:uuid:0031> ns1:foo "bar" .
>>> print g.serialize(format='n3')
@edsu
edsu / curalog.txt
Created December 17, 2010 17:14
post to unalog w/ curl
curl --user user:pass --header "Content-type: application/json" --data '{"url": "http://inkdroid.org", "title": "inkdroid.org"}' http://localhost:8000/entry/new
ed@curry:~$ curl -i http://t.co/DEEYbu1
HTTP/1.1 301 Moved Permanently
Date: Tue, 21 Dec 2010 02:31:16 GMT
Server: hi
Location: http://itun.es/iFT6tM
Cache-Control: private,max-age=300
Expires: Tue, 21 Dec 2010 02:36:16 GMT
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
<VirtualHost *:80>
ServerName unalog.inkdroid.org
ServerAlias unalog.inkdroid.org
CustomLog /var/log/apache2/unalog.inkdroid.org-access.log combined
ErrorLog /var/log/apache2/unalog.inkdroid.org-error.log
#AliasMatch /([^/]*\.css) /home/ed/Projects/unalog2/base/media/css/$1
Alias /s/ /home/ed/Projects/unalog2/base/media/
Alias /media/ /usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/media/
@edsu
edsu / wozzon.html
Created January 3, 2011 16:30
wozzon microformats
<!-- Google Rich Snippet : Microformat -->
<div class="vevent">
<a href="http://www.wozzon.com:80/url/event/miller-anderson@the-open-house/7939994702/2493220502/" class="url"></a>
<span class="summary"><span class="value-title" title="Miller Anderson"></span></span>
<span class="category"><span class="value-title" title="Music" ></span></span>
<span class="dtstart">
<span class="value-title" title="2011-01-07T00:00:00+00:00"></span>
@edsu
edsu / dupes.py
Created January 11, 2011 19:12
check simon's report of dupes for things that haven't been deleted
#!/usr/bin/env python
"""
Uses Simon's report of duplicates in the id.loc.gov LCSH data, and
looks to see which are actually duplicates that return 200 OK.
"""
import json
import urllib
@edsu
edsu / dupes.json
Created January 11, 2011 19:48
results of dupes.py
{
"History--[period subdivision]--Sources": [
"http://id.loc.gov/authorities/sh2002012009#concept",
"http://id.loc.gov/authorities/sh2002012012#concept"
],
"History--[period subdivision]--Biography--Sources": [
"http://id.loc.gov/authorities/sh2003007703#concept",
"http://id.loc.gov/authorities/sh2003007704#concept"
],
"Foreign relations--Treaties": [