Skip to content

Instantly share code, notes, and snippets.

View jaw111's full-sized avatar

John Walker jaw111

  • Semaku
  • Eindhoven
View GitHub Profile
@jaw111
jaw111 / fileSplit
Created January 2, 2014 08:59
Simple VBA macro to split a text file (*.txt) into chunks where maximum number of lines for each chunk is entered by user. The output files get the same name as the source text file, but with _1, _2,... appended to the file name (example.txt => example_1.txt, example_2.txt etc.).
Sub split()
Dim fNameAndPath As Variant
Dim TextLine, fName
Dim fileCount, myCount, numberOfLines As Integer
Dim outputFile
myCount = 0
fileCount = 1
fNameAndPath = Application.GetOpenFilename(FileFilter:="Text files (*.txt), *.txt", Title:="Select File To Be Opened")
@jaw111
jaw111 / gist:9729451
Last active August 29, 2015 13:57
JSON-LD context for RDW vehicle API
{
"@context": {
"@language": "nl",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"foaf": "http://xmlns.com/foaf/0.1/",
"rdwv": "https://w3id.org/rdw/vehicles#",
"dbpedia": "http://dbpedia.org/resource/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"resource": "foaf:topic",
@jaw111
jaw111 / gist:9729470
Last active August 29, 2015 13:57
RDW vehicle vocabulary
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"dcterms": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"rdwv": "https://w3id.org/rdw/vehicles#",
"defines": {"@reverse": "rdfs:isDefinedBy"},
"rdfs:domain": {"@type": "@id"},
@jaw111
jaw111 / 70rpjj.json
Last active August 29, 2015 13:58
Example JSON-LD response from RDW Vehicle API
{
"@context": "https://w3id.org/rdw/contexts/vehicles",
"@id": "",
"success" : true,
"resource" : {
"@id": "#this",
"Aantalcilinders" : 4,
"Aantalstaanplaatsen" : null,
"Aantalzitplaatsen" : 5,
"BPM" : 3082,
@jaw111
jaw111 / frame1.jsonld
Last active August 29, 2018 19:01
example skos tree in JSON-LD
{
"@context": {
"skos": "http://www.w3.org/2004/02/skos/core#"
},
"@type": "skos:ConceptScheme",
"skos:hasTopConcept": {
"@type": "skos:Concept"
}
}
@jaw111
jaw111 / facets.json
Last active August 29, 2015 14:02
Data for faceted search demo
[
{
"title":"Farbe",
"id":"color",
"type":"multiple",
"choices": [
{"id":"facet1-1","value":"Ableiter rot"},
{"id":"facet1-1","value":"anthrazit"},
{"id":"facet1-1","value":"beige"},
{"id":"facet1-1","value":"blassgrün"},
@jaw111
jaw111 / .BreweryLD.md
Last active August 29, 2015 14:03
BreweryLD

BreweryLD

A Linked Data wrapper for the BreweryDB API

This Gist implements a prototype vocabulary and Linked Data representation for resources from the BreweryDB API.

The wrapper supports most endpoints from the BreweryDB API serving a JSON-LD response by default. The JSON-LD representation is generated from the original JSON using the index.php script. Only requests made using GET method are currently supported.

Examples:

@jaw111
jaw111 / skos.jsonld
Created July 27, 2014 13:15
SKOS JSON-LD context
{
"@context": {
"@vocab": "http://www.w3.org/2004/02/skos/core#",
"broadMatch": { "@type": "@id" },
"broader": { "@type": "@id" },
"broaderTransitive": { "@type": "@id" },
"closeMatch": { "@type": "@id" },
"exactMatch": { "@type": "@id" },
"hasTopConcept": { "@type": "@id" },
"inScheme": { "@type": "@id" },
@jaw111
jaw111 / gs1.jsonld
Last active February 12, 2021 00:55
GS1 GTIN+ OTW JSON-LD example
{
"@context": {
"gs1": "http://gs1.org/voc/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"gtin13": {
"@id": "gs1:gtin13",
"@type": "xsd:string"
},
"ingredientpercentage": {
"@id": "gs1:ingredientpercentage",
{
"@context": {
"@base": "http://qa.data.nxp.com/id/",
"id": "@id",
"data": "@graph",
"dct": "http://purl.org/dc/terms/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"nxp": "http://purl.org/nxp/schema/v1/",
"foaf": "http://xmlns.com/foaf/0.1/",
"xsd": "http://www.w3.org/2001/XMLSchema#",