Skip to content

Instantly share code, notes, and snippets.

@bergos
bergos / gist:a68268bcb8743dda82fe
Created January 29, 2015 17:30
Event Binding
utils.Event.Binding = function (master, event) {
var self = this;
var wrapper = function (func) {
var args = Array.prototype.slice(arguments, 1);
func.apply(self, self.args(args));
};
this.on = function (func) {
var rdf = require('rdf-ext')();
var turtleString = '' +
'@base <http://example.org/> .' +
'@prefix s: <http://schema.example.org/> .' +
'<me> s:owns ( <Apple> <Orange>).';
rdf.parseTurtle(turtleString, function (graph) {
console.log(graph.toString());
});
@bergos
bergos / config.js
Last active November 1, 2015 20:17
'use strict';
var
fs = require('fs'),
path = require('path');
var buildQuery = function (iri) {
return 'DESCRIBE <' + iri + '>';
};
var buildExistsQuery = function (iri) {
return 'ASK { GRAPH <http://dbpedia.org> { <' + iri + '> ?p ?o }}';
};
'use strict'
const Readable = require('stream').Readable
class StreamWrapper extends Readable {
constructor (stream) {
super()
this._read = () => {
stream.read().then((chunk) => {
ExifTool Version Number : 10.23
File Name : IMG_7566.dng
Directory : .
File Size : 22 MB
File Modification Date/Time : 2017:03:24 09:59:16+01:00
File Access Date/Time : 2017:03:24 10:00:04+01:00
File Inode Change Date/Time : 2017:03:24 09:59:16+01:00
File Permissions : rw-r--r--
File Type : DNG
File Type Extension : dng