Skip to content

Instantly share code, notes, and snippets.

View darobin's full-sized avatar
✍️
writing, writing, writing…

Robin Berjon darobin

✍️
writing, writing, writing…
View GitHub Profile
@darobin
darobin / kadesh.md
Last active December 2, 2016 07:02
Old W3C/WHATWG peace proposal

A few years ago, the W3C reached out to the WHATWG in order to put an end to the continuous bickering, stop work duplication, end the confusion that developers (and many others) feel due to the split, etc. The proposal was made in private to avoid the acrimonious politics that it would draw and in the hope of eventually surfacing it as a bilateral proposal rather than an olive branch from just one protagonist. (This may have been a mistake.)

The founding principle of the proposal was that in a world of computers and automated publishing, the living standard versus snapshot divide is stupid: you can have both, with one generated from the other. There is no need to convince others that your view is best. There is certainly no need to condescend to Web developers because they may not behave the way you wish they did. You only need to make it clear which is which and what each is for.

@darobin
darobin / _original_jats.xml
Last active October 25, 2016 15:09
Lists with headers
<!-- a JATS list -->
<list>
<label>A.6</label>
<title>A List of Stuff</title>
<list-item>Thing One</list-item>
<list-item>Thing Two</list-item>
<list-item>A Third Item For Good Measure</list-item>
</list>
@darobin
darobin / README.md
Last active August 11, 2016 09:14 — forked from anonymous/README.md
JSON-LD Playground: SBAON
import React from 'react'
import Portal from 'react-portal'
class LinkBlock extends React.Component {
constructor (props) {
super(props)
this.state = {
href: this.props.node.data.get('href'),
showingPopup: false,
popup: null,
@darobin
darobin / composition.html
Last active March 9, 2020 19:22
Having fun with composition events!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CompositionUpdate</title>
</head>
<body>
<input id="input">
<pre id="log"></pre>
<script>
<!--
NOTES:
- this does not include affiliation for people: that is a more complex situation (we might be happy with just the ORCID).
- there is no specific subtyping information, I am unsure what to do there.
- this is deliberately using RDFa.
-->
<div typeof="schema:Dataset" resource="doi:10.4242/cryptoZ.2017">
<span property="schema:name">Sightings of Levrogyrous Dahuts during Transalpine Migratory Periods</span>
<span property="schema:author" typeof="schema:Person" resource="http://orcid.org/0000-0002-1731-5346">
<span property="schema:name">Robin Berjon</span>
// from the brilliant mind of sb
var _catch = Promise.prototype.catch;
Promise.prototype.catch = function () {
return _catch.call(this, function (err) { setTimeout(function () { throw(err); }, 0); });
}
@darobin
darobin / dependency.md
Last active January 28, 2016 21:13
Schema.org dependencies for software and data

In npm you can express the basic informaion about a project and its dependencies in the following manner:

{
  "name": "dahut",
  "version": "1.42.17",
  "dependencies": {
    "cryptozoology": "^0.9.2",
 "jsdom": "1.2.7 || &gt;=1.2.9 &lt;2.0.0",
@darobin
darobin / calorimetre.js
Created December 18, 2015 18:13
a quick and dirty tool to know what is taking up space in a bundle
// a quick and dirty tool to know what is taking up space in a bundle
// this should be made generic
// USAGE:
// - save it somewhere
// - replace `entryFile` with the path to your entry point
// - check that the browserify options make some sort of sense
// - run it
// The output will be a long list of dependencies. The first is the entry point, after that they're ordered
// by size. Each lists its size and what includes it. You can use that to get a feel for what can be usefully
// optimised out.
@darobin
darobin / cookie-doorslam.html
Created August 5, 2015 14:03
Simple idea: a browser extension that automatically kills the parent element of <link rel="cookie-policy">