Skip to content

Instantly share code, notes, and snippets.

View skaegi's full-sized avatar

Simon Kaegi skaegi

  • IBM
  • Ottawa, Canada
View GitHub Profile
// HOWTO: load LABjs itself dynamically!
// inline this code in your page to load LABjs itself dynamically, if you're so inclined.
(function (global, oDOC, handler) {
var head = oDOC.head || oDOC.getElementsByTagName("head");
function LABjsLoaded() {
// do cool stuff with $LAB here
}
@dherman
dherman / realms.md
Last active December 27, 2015 10:39
Why (hookable) eval/Function, globals, and realms are all necessarily coupled.

Design "theorem".

The (hookable) eval/Function function objects, the global object, and the realm all have to be in 1:1 correspondence.

"Proof".

(a) same realm ==> same Function

Since Function is reachable by function literals, it is tied to a realm.

@dherman
dherman / loader-api.md
Last active January 31, 2019 03:02
Complete ES6 Loader API

Notational Conventions

This section describes the conventions used here to describe type signatures.

A [T] is an array-like value (only ever used read-only in this API), i.e., one with an integer length and whose indexed properties from 0 to length - 1 are of type T.

A type T? should be read as T | undefined -- that is, an optional value that may be undefined.

Loaders

@amshinde
amshinde / K8s-Raw-Block-Kata.md
Last active December 29, 2020 03:55
K8s Raw Block storage support with Kata