Skip to content

Instantly share code, notes, and snippets.

View soylent-grin's full-sized avatar
✴️
Nun, falsche Welt

soylent-grin soylent-grin

✴️
Nun, falsche Welt
View GitHub Profile
@soylent-grin
soylent-grin / description_SPT943_4.ttl
Last active August 29, 2015 14:21
Exampe of sensor description using extension of LIMAP ontology (http://data.uni-muenster.de/php/vocab/limap)
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
@prefix hmtr: <http://purl.org/NET/ssnext/heatmeters#> .
@prefix ssncom: <http://purl.org/NET/ssnext/communication#> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix geosparql: <http://www.opengis.net/ont/geosparql#> .
@prefix dul: <http://www.loa-cnr.it/ontologies/DUL.owl#> .
@prefix limapext: <http://purl.org/NET/limapext#> .
@prefix limap: <http://data.uni-muenster.de/php/vocab/limap> .
@soylent-grin
soylent-grin / heat.ttl
Created May 17, 2015 13:32
Example of heat meter testimonials with unit of measurement
@prefix hmtr: <http://purl.org/NET/ssnext/heatmeters#> .
@prefix meter: <http://purl.org/NET/ssnext/meters/core#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix om: <http://purl.org/ifgi/om#> .
@prefix : <coap://10.1.1.1:6500/meter/heat#> .
:1431869485138 a hmtr:HeatObservation ;
ssn:observationResultTime "2015-05-17T13:31:25.138Z"^^xsd:dateTime ;
ssn:observedBy <coap://10.1.1.1:6500/meter> ;
@soylent-grin
soylent-grin / .eslintrc
Created July 24, 2015 08:44
My ESLint configuration sample
###########################################################################
# #
# 0 - turn the rule off #
# 1 - turn the rule on as a warning (doesn't affect exit code) #
# 2 - turn the rule on as an error (exit code is 1 when triggered) #
# #
# see http://eslint.org/docs/rules/ #
# #
###########################################################################
@soylent-grin
soylent-grin / Grintfile.js
Created July 24, 2015 08:56
My Gruntfile.js sample template
module.exports = function (grunt) {
"use strict";
// requirements
var fs = require('fs');
var glob = require("glob");
var argv = require('yargs').argv;
var mkdirp = require('mkdirp');
var asyncReduce = function(array, iterator, callback) {
var index = 0;
if (!(array instanceof Array)) {
throw new Error('first argument is required to be an array');
}
if (!iterator || typeof iterator !== "function") {
throw new Error('second argument required to be a function');
}
{
"@context": {
"dul": "http://www.loa-cnr.it/ontologies/DUL.owl#",
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
"geosparql": "http://www.opengis.net/ont/geosparql#",
"hmtr": "http://purl.org/NET/ssnext/heatmeters#",
"limap": "http://data.uni-muenster.de/php/vocab/limap",
"limapext": "http://purl.org/NET/limapext#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
@soylent-grin
soylent-grin / bc.js
Last active November 24, 2015 19:14
Batched Component
...
lock() {
if (this._lockTimeout) {
clearTimeout(this._lockTimeout);
}
this.locked = true;
this._lockTimeout = setTimeout(() => { this.locked = false; }, LOCK_TIMEOUT);
}
componentDidUpdate() {