Skip to content

Instantly share code, notes, and snippets.

View gkellogg's full-sized avatar

Gregg Kellogg gkellogg

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Replace me with a real title</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script class="remove">
// All config options at https://respec.org/docs/
var respecConfig = {
specStatus: "ED",
{
"agreement": {
"title": "I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.",
"type": "boolean",
"required": true
}
}
@gkellogg
gkellogg / json-ld-api.html
Created June 8, 2018 23:11
Updates for JSON-LD CG Final Reports
<!DOCTYPE html><html lang="en"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta name="generator" content="ReSpec 21.0.2"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><style>/* --- EXAMPLES --- */
div.example-title {
min-width: 7.5em;
color: #b9ab2d;
}
div.example-title span {
text-transform: uppercase;
}
aside.example, div.example, div.illegal-example {
padding: 0.5em;
@gkellogg
gkellogg / json-ld.html
Created February 17, 2018 02:01
Respec schema.org transformations
<!DOCTYPE html><html lang="en" typeof="schema:TechArticle w3p:WD" prefix="w3p: http://www.w3.org/2001/02pd/rec54#"><head><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta name="generator" content="ReSpec Developer Edition"><meta lang="" property="schema:inLanguage" content="en"><style>/* --- EXAMPLES --- */
div.example-title {
min-width: 7.5em;
color: #b9ab2d;
}
div.example-title span {
text-transform: uppercase;
}
aside.example, div.example, div.illegal-example {
padding: 0.5em;
@gkellogg
gkellogg / README.md
Created November 6, 2017 19:39
Verifiable Claims Vocabulary/Context

Updating vocabulary

Vocabulary definitions are managed in vocab.csv. Add or change entries within this file. Regenerate credentials.ttl, credentials.jsonld, and credentials.html as described below.

Building credentials.html, credentials.jsonld and credentials.ttl

All files are based on vocab.csv. Run mk_vocab.rb to build both credentials.html, credentials.jsonld and credentials.ttl

@gkellogg
gkellogg / 0.jsonld
Last active December 19, 2016 17:08
Example ShExJ files and context compatible with JSON-LD
{
"@context": "https://gist.githubusercontent.com/gkellogg/d80b4dde9acc64bd7cf2154c27634b83/raw/eaca2a6d4f9f192e53a1a0fd3ee6db91d0153f48/context.jsonld",
"type": "Schema",
"shapes":{
"http://a.example/S1": {
"type": "Shape"
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>Building JSON-LD APIs: Best Practices</title>
<meta charset='utf-8'>
<script class="remove" src="local-biblio.js"></script>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
async class='remove'></script>
<script class='remove'>
var respecConfig = {
@gkellogg
gkellogg / rbx-bug.rb
Created April 29, 2016 19:45
Rubinius splat with **options bug
class Outer
def initialize(*args, **options)
raise ArgumentError, "args should be an array of a String, was #{args.inspect}" if args.first.is_a?(Array)
end
end
class Inner < Outer
def initialize(*args, **options)
super
end
@gkellogg
gkellogg / lrmi.html
Created April 28, 2016 21:18
Example HTML output from rdf gen-vocab for LRMI
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>http://purl.org/dcx/lrmi-terms/</title>
<style type="text/css">
dl.terms dt {
float: left;
clear: left;
@gkellogg
gkellogg / manifest-model.jsonld
Last active April 25, 2016 12:17
Potential Annotation test harness
{
"@context": "https://github.io/w3c/annotation/testing/context.jsonld",
"id": "manifest-model",
"type": "mf:Manifest",
"label": "Web Annotation Data Model Tests",
"comment": "Runs a battery of test patterns against multiple annotations in JSON-LD format. Each test entry identifies a procedure for generating an annotation, and the results are matched against a set of patterns.",
"entries": [
{
"id": "manifest-model#test001",
"type": "ant:SchemaTest",