Skip to content

Instantly share code, notes, and snippets.

@fbender
fbender / strawman-http-session-persistence.md
Last active August 29, 2015 14:27
[Strawman] Proposal for HTTP Session & User Identification (Persistence)

Goals

  • specify use cases of session management and persistence
  • identify use cases of Cookies not concerning session management and persistence
  • allow a website to act as an identity broker for other websites, (optionally?) factoring in OpenID/Persona/etc.
  • replace Cookies with more user control and enhanced privacy (e.g. allow use case 1 below)
  • find a technical solution for the EU Cookie Law resp. its goal
  • propose HTTP Session & User Identification as an HTTP/2 extension (allow Cookie Upgrading?)
  • propose HTTP Session & User Identification as a replacement for Cookies in HTTP/3
  • the spec behaviour should be (largely) polyfill-able via Service Workers, i.e. user agent complies with spec even though it natively does not (requires complying server)

Keybase proof

I hereby claim:

  • I am fbender on github.
  • I am fbender (https://keybase.io/fbender) on keybase.
  • I have a public key whose fingerprint is 65AE C8A5 9890 99CC 951C 8CC2 38A5 7375 EFD0 B4D8

To claim this, I am signing this object:

@fbender
fbender / diff-toggler.js
Last active August 29, 2015 14:03
SPAN toggler with JSON import / export
// License: MIT
// Wrote this to help me with merging two spreadsheets using a WinMerge diff report. This is in no way optimized.
// The report HTML only requires adding the JS and desired CSS for the toggled state, e.g.:
// <style>span.toggled{background-color:lightcyan !important;}</style>
// Gecko-based browsers with context menu support have "Import" and "Export" items added to their context menu.
"use strict";
function getNodes(selector) {
var nodelist = document.querySelectorAll(selector);
@fbender
fbender / fortran-num.m
Last active August 29, 2015 14:02
Validate a Fortran number literal in Matlab (Snippet).
validInt = '^\d+$';
ri = regexp(value, validInt);
if size(ri, 2) == 1
% integer
end
validDouble = '^(\d+(\.\d*)?|\.\d+)[dD][+-]?\d{1,3}$';
rd = regexp(value, validDouble);
@fbender
fbender / netinfo-if-network-link.md
Last active August 29, 2015 13:56
W3C/netinfo: the `NetworkLink` interface