This has now been moved to a proper GitHub repository: https://github.com/njh/gen-webid-cert
Please submit issues and enhancements there.
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'json' | |
| require 'net/http' | |
| require 'uri' | |
| require 'mqtt' | |
| require 'pp' | |
| NOW_NEXT_RADIO_URL = 'http://www.bbc.co.uk/iplayer/ion/multinownext/service_type/radio/format/json' |
| { | |
| "artist": { | |
| "artist_type": "Person", | |
| "name": "Terence Trent D'Arby", | |
| "sort_name": "D'Arby, Terence Trent", | |
| "gid": "91f603ca-b126-42a2-9c29-820ca687347c", | |
| "disambiguation": null, | |
| "begin_date": "1962-03-15", | |
| "end_date": null, | |
| "wikipedia_article": { |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'em-mqtt' | |
| require 'sinatra/base' | |
| require 'thin' | |
| class WebApp < Sinatra::Base |
| <?php | |
| set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); | |
| require_once "EasyRdf.php"; | |
| EasyRdf_Namespace::set('cert', 'http://www.w3.org/ns/auth/cert#'); | |
| $graph = new EasyRdf_Graph(); | |
| $bob = $graph->resource('https://bob.example/profile#me', 'foaf:Person'); | |
| $bob->addLiteral('foaf:name', 'Bob'); | |
| $bob->addResource('foaf:weblog', 'http://bob.example/blog'); |
This has now been moved to a proper GitHub repository: https://github.com/njh/gen-webid-cert
Please submit issues and enhancements there.
| #!/usr/bin/perl | |
| use strict; | |
| open(TSV, "freebase-sameas-dbpedialite-20120424.tsv") or die "Failed to open file: $!"; | |
| my %map; | |
| while(<TSV>) { | |
| my ($freebase, $dbpedialite) = split(/\s+/); | |
| <?php | |
| set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); | |
| require_once "EasyRdf.php"; | |
| $webid = 'http://www.aelius.com/njh#me'; | |
| $graph = new EasyRdf_Graph($webid); | |
| $graph->load(); | |
| $person = $graph->resource($webid); |
| #!/bin/sh | |
| COSM_API_KEY="abcdefghijk" | |
| DATASTREAM="/v2/feeds/70987/datastreams/0.csv" | |
| hddtemp -u C -n /dev/sda | \ | |
| mosquitto_pub -d -h api.cosm.com -u "$COSM_API_KEY" -t "$DATASTREAM" -s |
| <?php | |
| require 'Slim/Slim.php'; | |
| // Prepare app | |
| $app = new Slim(array( | |
| 'negotiation.enabled' => true | |
| )); | |
| $app->get('/books/:id:format', function ($id) use ($app) { |
| <?php | |
| set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/'); | |
| require_once "EasyRdf.php"; | |
| EasyRdf_Namespace::set('dbpedia', 'http://dbpedia.org/ontology/'); | |
| EasyRdf_Namespace::set('dbprop', 'http://dbpedia.org/property/'); | |
| $sparql = new EasyRdf_Sparql_Client('http://dbpedia.org/sparql'); |