Skip to content

Instantly share code, notes, and snippets.


Roderic Page rdmpage

View GitHub Profile
rdmpage / zotero-wikidata-lookup.js
Last active Jul 9, 2020 — forked from zuphilip/zotero-wikidata-lookup.js
Zotero Script for Wikidata Lookup
View zotero-wikidata-lookup.js
// Zotero script look up selected items in Wikidata and
// check whether the DOI can be found there. If results
// are found then the QIDs are saved in the corresponding
// items in the extra field. Some warnings are given for the
// other cases; thus watch the Zotero error console as well
// during execution of the script. [CC0]
var items = Zotero.getActiveZoteroPane().getSelectedItems();
var map = [];
rdmpage /
Created Nov 10, 2017 — forked from justinbellamy/
Install Autoconf and Automake on OS X El Capitan
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
# This script is originally from
export build=~/devtools # or wherever you'd like to build
rdmpage /
Created Apr 18, 2017 — forked from jprante/
JSON-LD in Elasticsearch
curl -XDELETE 'localhost:9200/jsonld'
curl -XPOST 'localhost:9200/jsonld'
curl -XPUT 'localhost:9200/jsonld/doc/1' -d '
"dc": "",
rdmpage /
Created Jan 11, 2016 — forked from benbalter/
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
View gist:8ce96f26ff9826d206c5
= Network versioning using relationnodes
Recently there was a nice blog on versioning networks by Ian Robinson ([read it here]) on using identity nodes and separating structure from state. In this gist I'd like to put in my 2 cents by introducing another approach using _relationnodes_. This is more about structure of a network than about states of nodes, but it treats versioning differently. As Ian states in his blog, there's always a trade-off to be made, since versioning causes an extra load on storage and processing.
== Relationnodes?
=== What are relationnodes?
Relation nodes are intermediary nodes between two network nodes that represents the relation between the nodes.
So, if A and B are two network nodes, instead of connecting them with a relationship of `[:RELTYPE]`,