Skip to content

Instantly share code, notes, and snippets.

View msporny's full-sized avatar

Manu Sporny msporny

View GitHub Profile
@msporny
msporny / gist:d0e1709ebaa229bd9573
Created November 3, 2014 14:18
Example of http-problem in JSON-LD
{
"@context": ["https://ietf.org/contexts/http-problem/v1", "https://example.com/contexts/my-extension/v1"],
"type": ["HttpProblem", "OutOfCredit"],
"title": "You do not have enough credit.",
"detail": "Your current balance is 30, but that costs 50.",
"instance": "http://example.net/account/12345/msgs/abc",
"balance": 30,
"accounts": ["http://example.net/account/12345", "http://example.net/account/67890"]
}
@msporny
msporny / gist:9063806
Created February 18, 2014 02:50
Example of Actions for Linked Data objects
{
id: 'https://example.com/i/manu',
name: 'Manu Sporny'
assertions: [ ... ]
actions: {
patch: {
url: 'https://example.com/i/manu?action=patch',
verb: 'POST',
format: 'json-patch'
},
{
"@context":"http://api.lobid.org/context/lobid-organisations.json",
"@id":"http://lobid.org/organisation/DE-605",
"@type":"http://xmlns.com/foaf/0.1/Organization",
"contactqr":"http://lobid.org/media/DE-605_contactqr.png",
"fundertype":{
"@id":"http://purl.org/lobid/fundertype#n02",
"@type":"http://www.w3.org/2004/02/skos/core#Concept",
"prefLabel":{
"de":"Land",
@msporny
msporny / gist:6308659
Created August 22, 2013 15:24
Corrected publisher using only RDFa Lite
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Basic Koha bib record</title>
</head>
<body>
<div class="record" vocab="http://schema.org/" typeof="CreativeWork Product" resource="#record">
<h1 class="title" property="name">Songs of the 60's : piano, vocal, guitar. </h1>
<div class="results_summary series">
@msporny
msporny / gist:6308591
Created August 22, 2013 15:20
Fixed publisher name issue with markup.
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Basic Koha bib record</title>
</head>
<body>
<div class="record" vocab="http://schema.org/" typeof="CreativeWork Product" resource="#record">
<h1 class="title" property="name">Songs of the 60's : piano, vocal, guitar. </h1>
<div class="results_summary series">