Skip to content

Instantly share code, notes, and snippets.

@rdmpage
rdmpage / index.html
Created December 6, 2012 14:02
Javascript phylogeny viewer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Javascript Phylogeny Viewer</title>
<style type="text/css" title="text/css">
@import url("/style.css?20120730");
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://blog.accursedware.com/jquery-svgpan/jquery-svgpan.js"></script>
@rdmpage
rdmpage / 2236C72B-206D-405B-AFAC-EBA246EC8AE5.json
Last active October 13, 2015 07:57
ZooBank JSON for 2236C72B-206D-405B-AFAC-EBA246EC8AE5
[
{
"tnuuuid": "2236C72B-206D-405B-AFAC-EBA246EC8AE5",
"OriginalReferenceUUID": "BC94AF66-4059-4CCA-81D7-FEC49B067B77",
"protonymuuid": "288E04E0-BA61-471D-BA62-47C10CDDC15C",
"label": "Belonoperca Fowler & Bean 1930",
"value": "Belonoperca Fowler & Bean 1930",
"lsid": "urn:lsid:zoobank.org:act:288E04E0-BA61-471D-BA62-47C10CDDC15C",
"parentname": "",
"namestring": "Belonoperca",
@rdmpage
rdmpage / zoobank.dot
Created November 28, 2012 10:43
ZooBank data model
digraph {
1758 -> 1930 -> 1998 -> 2004;
/* publications */
"BC94AF66-4059-4CCA-81D7-FEC49B067B77" [shape="box",label="The fishes of the families Amiidae, Chandidae, Duleidae, and Serranidae\nBC94AF66-4059-4CCA-81D7-FEC49B067B77\nhttp://biostor.org/reference/105997"];
"F8ECE6CE-E77F-4768-A563-62E416592874" [shape="box",label="Belonoperca pylei, a new species of seabass...\nF8ECE6CE-E77F-4768-A563-62E416592874\nDOI:10.1007/BF02725185"];
/* 1930 */
@rdmpage
rdmpage / iriscouch.txt
Created October 4, 2012 16:18
Replicate local CouchDB to iriscouch
curl http://admin:password@localhost:5984/_replicate -H 'Content-Type: application/json' -d '{ "source": "afd", "target": "https://admin:[email protected]/afd" , "proxy":"http://wwwcache.gla.ac.uk:8080"}'
@rdmpage
rdmpage / cloudant_replication.txt
Created October 4, 2012 15:36
Replicate local CouchDB database to Cloudant (replace
curl http://admin:password@localhost:5984/_replicate -H 'Content-Type: application/json' -d '{ "source": "afd", "target": "https://admin:[email protected]/afd" , "proxy":"http://wwwcache.gla.ac.uk:8080"}'
replace "admin" and "password" by username and password
@rdmpage
rdmpage / .gitignore_global
Created October 4, 2012 13:44
Global .gitignore file, set using: git config --global core.excludesfile ~/.gitignore_global
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Compiled Object files
@rdmpage
rdmpage / Notonemouridae.svg
Created September 24, 2012 10:46
Notonemouridae
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rdmpage
rdmpage / Design document
Created September 24, 2012 09:37
Full text search in Cloudant
{
"_id": "_design/lookup",
"_rev": "2-2763d098bce604230bfc247ca06cba05",
"language": "javascript",
"indexes": {
"all": {
"index": "function(doc) {\n if (doc.title)\n {\n index(\"title\", doc.title, {\"store\": \"yes\"});\n }\n }"
}
}
}
@rdmpage
rdmpage / replicate-couchdb.txt
Created September 4, 2012 10:18
Replicate CouchDB
To ensure local CouchDB database is externally accessible first go to the configuration page
http://localhost:5984/_utils/config.html
and change bind_address (httpd section) from 127.0.0.1 to 0.0.0.0 then restart
CouchDB.
To confirm, use command
lsof -i -n -P | grep LISTEN
@rdmpage
rdmpage / SnippetFile
Created August 14, 2012 21:50
HTML multibyte string
$html = mb_convert_encoding($html, 'UTF-8', 'HTML-ENTITIES');