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 / 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 / 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.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 / 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 / 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 / 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 / zeroMQ_homestead
Created December 1, 2015 21:14
Installing ZermoMQ on Homestead
First install ZeroMQ itself.
1. sudo apt-get update
2. sudo apt-get install pkg-config
3. sudo apt-get install libzmq3-dev
Now install the PHP language binding. We assume PHP is running as PHP-FPM.
1. sudo pecl install zmq-beta
@netsensei
netsensei / nasa.xsl
Created September 26, 2015 14:46
Converts XML output of the US GSA Social Media API to CSV - http://registry.usa.gov/accounts.xml?agency_id=nasa
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:variable name="delimiter" select="','" />
<!-- define an array containing the fields we are interested in -->
<xsl:variable name="fieldArray">
<field>service_id</field>
<field>account</field>
@netsensei
netsensei / index.js
Last active June 7, 2021 17:08
Using the Promise library + Fast-CSV to read/write CSV files
var promiseCSV = require('promiseCSV.js');
var path = "in.csv";
var options = { 'headers': true };
promiseCSV(path, options).then(function (records) {
// do other stuff
});
@netsensei
netsensei / adlib-csv.xsl
Created August 27, 2015 20:57
Adlib XML to CSV XSLT.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:variable name="delimiter" select="';'" />
<!-- define an array containing the fields we are interested in -->
<xsl:variable name="fieldArray">
<field>Production</field>
<field>object_number</field>