Skip to content

Instantly share code, notes, and snippets.

@stefanprobst
stefanprobst / index.html
Created September 8, 2023 07:00
yLGgxdK
<nav aria-label="Mythical University">
<ul id="exTest" class="disclosure-nav">
<li>
<button type="button" aria-expanded="true" aria-controls="id_about_menu">About</button>
<ul id="id_about_menu">
<li>
<a href="#mythical-page-content">Overview</a>
</li>
<li>
<a href="#mythical-page-content">Administration</a>
@stefanprobst
stefanprobst / transform.cjs
Last active March 12, 2023 12:35
add .js extension to imports
module.exports = function (
/** @type {import('jscodeshift').FileInfo} */ fileInfo,
/** @type {import('jscodeshift').API} */ api,
) {
const ast = api.jscodeshift(fileInfo.source);
const nodes = ast.find("ImportDeclaration");
nodes.forEach((node) => {
const path = node.value.source.value
if (path.startsWith('@/') && !path.endsWith('.js')) {
@stefanprobst
stefanprobst / cidoc-crm.json
Created January 23, 2023 12:09
cidoc crm 6.2.1
{
"@context": {
"crm": "http://www.cidoc-crm.org/cidoc-crm/",
"id": "@id",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"type": "@type"
},
"@graph": [
from rdflib import Graph
# see "https://www.iflastandards.info/lrm/lrmer.html"
url = "https://raw.githubusercontent.com/iflastandards/LRM/master/xml/ns/lrm/lrmer.xml"
g = Graph()
g.parse(url, format="xml")
context = {
@stefanprobst
stefanprobst / frbroo.json
Last active January 21, 2023 14:14
frbroo in json-ld serialisation (matching cidoc crm)
{
"@context": {
"crm": "http://www.cidoc-crm.org/cidoc-crm/",
"frbroo": "http://iflastandards.info/ns/fr/frbr/frbroo/",
"id": "@id",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"type": "@type"
},