Skip to content

Instantly share code, notes, and snippets.

View netsensei's full-sized avatar
👾
retro-wave driven development

Matthias Vandermaesen netsensei

👾
retro-wave driven development
View GitHub Profile
@netsensei
netsensei / creators_dod.sparql
Created January 28, 2016 20:05
SPARQL query against wikidata example.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?c ?cLabel (substr(?dod, 0, 4) as ?t)
WHERE
@netsensei
netsensei / french_aoc_wines.sparql
Last active February 1, 2016 16:47
French cheeses (wikidata)
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?sLabel ?lLabel ?geo {
?s wdt:P31 wd:Q1565828 .
@netsensei
netsensei / catmandu_module.md
Last active September 1, 2017 09:06
Bootstrap a Catmandu module

Catmandu development

Okay. So you want to build your own Catmandu module? This is a bit of documentation that should help you bootstrap your development environment.

Prerequisites

PERL

Catmandu depends on Perl. You can start out working with system Perl that came with your OS. But since you want to do active development, it's recommended to go with an alternate installation and leave the default alone. This is especially true if you work on OSX or Windows!

@netsensei
netsensei / rma.ttl
Created August 5, 2017 13:00
Rijksmuseum Turtle sample
collection:BK-AM-33-C
a edm:ProvidedCHO ;
dc:coverage "fourth quarter 15th century"@en ,
"vierde kwart 15e eeuw"@nl ;
dc:creator <urn:rijksmuseum%3Apeople%3ARM0001.PEOPLE.107435> ,
<urn:rijksmuseum%3Apeople%3ARM0001.PEOPLE.107436> ,
<urn:rijksmuseum%3Apeople%3ARM0001.PEOPLE.98030> ,
"toegeschreven aan Borman, Jan (II)"@nl ,
"toegeschreven aan Thienen, Renier van"@nl ,
"verworpen toeschrijving Delemer, Jean"@nl ;
@netsensei
netsensei / rma.json
Created August 5, 2017 13:09
Rijksmuseum JSON sample
[
{
"https://www.rijksmuseum.nl/en/collection/BK-AM-33-C": {
"a": "edm_ProvidedCHO"
}
},
{
"https://www.rijksmuseum.nl/en/collection/BK-AM-33-C": {
"dc_coverage": "fourth quarter 15th century@en"
}
@netsensei
netsensei / rma_records.json
Created August 5, 2017 13:12
Rijkmuseum JSON data as records
[
{
"https://www.rijksmuseum.nl/en/collection/BK-AM-33-C": {
"a": "edm_ProvidedCHO",
"dc_coverage": [
"fourth quarter 15th century@en",
"vierde kwart 15e eeuw@nl"
],
"dc_creator": [
"<urn:rijksmuseum%3Apeople%3ARM0001.PEOPLE.107435>",
@netsensei
netsensei / arthub.md
Last active September 5, 2017 12:28
Installing the Datahub::Factory::Arthub modules

Installing the Datahub::Factory::Arthub modules

Introduction

The Datahub::Factory is a Catmandu based toolkit which allows easy and efficient setup and management of ETL pipelines. A pipeline transforms and transports data between two systems. The set of primary use cases for which this toolkit was conceived is situated within the GLAM (Galleries, Libraries, Archives & Museums) domain.

Out of the box, the Datahub::Factory is a generic, extensible toolkit. While you can use the

@netsensei
netsensei / process.pl
Created October 16, 2017 21:49
Add raw XML data from an OAI endpoint to a JSON dump in two passes.
#!perl
use JSON;
use Catmandu;
use Try::Tiny::ByClass;
use Data::Dumper;
sub prepare {
my $store = Catmandu->store(
@netsensei
netsensei / manifest.json
Last active April 19, 2018 09:42
IIIF manifest example
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://rails.box:3000/iiif/2/groeningemuseum:0000_GRO1561_I/manifest.json?locale=nl",
"@type": "sc:Manifest",
"label": "Johannes predikt tot de menigte",
"sequences": [
{
"@id": "http://groeningemuseum.be/collection/work/data/0000_GRO1561_I#sequence-1",
"@type": "sc:Sequence",
"label": "Current order",
@netsensei
netsensei / loris.md
Created May 12, 2018 15:11
Installing the Loris IIIF server

Python 2.7.9

sudo apt-get install build-essential sudo apt-get install zlib1g-dev libssl-dev python-dev

sudo apt-get install python-pip sudo pip install --upgrade pip sudo pip install virtualenv

cd /opt