I hereby claim:
- I am maxnordlund on github.
- I am maxnordlund (https://keybase.io/maxnordlund) on keybase.
- I have a public key ASBnMu1IGUACj7EGUL_RjMcu4g856OgXkYI9Yy0o_tFfsQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Disable stealthy-require as it breaks ESM in modernish node | |
// 1. Load stealthy-require into the require cache. This way all the module | |
// machinery gets run like normal. | |
require("stealthy-require") | |
// 1. Overwrite the real function with a dummy one | |
require.cache[require.resolve("stealthy-require")].exports = notSoSthealthyRequire | |
// 3. Dummy implementation that calls the provided callbacks in the right order |
module.exports = exports = benchmark | |
function benchmark(size, fn, name) { | |
console.time("benchmark " + name) | |
var result = 0 | |
for (var i = 0; i < size; ++i) result = fn(result, i)() | |
console.timeEnd("benchmark " + name) | |
console.log(result) |
def get_class(method): | |
""" | |
Get the class that the defined the provided method. | |
In Python 3 the concept of unbound method is removed and raw method | |
references are just plain functions. But it is sometimes useful to get the | |
class that defined that method. Unfortunately that turns out to be hard. | |
But there is a sure fire way of doing it, because Python exposes the | |
variables that a method can access, which by definition includes the | |
surronding class, so just go through that and find the class. | |
Of course it's not quite that simple. First off to find the class we check |
$size: 1rem; | |
$background: white; | |
hr[title] { | |
line-height: 0; | |
&::after { | |
background: $background; | |
content: attr(title); |
class DefaultList(list): | |
""" | |
List that always returns a value | |
If you try to access an missing index, it will fill up this list with | |
empty lists for all missing indices before returning the requested | |
index. This will be the last element since lists are ordered. | |
A consequence of this is that `for` loops over this list will never | |
stop. |
export default function createMixinFrom(...classes) { | |
let proto = Object.create(null) | |
function AnonymousMixinClass(...parameters) { | |
let proto = Object.getPrototypeOf(this) | |
// Run all super class constructors in order they were given. | |
// *This doesn't work without babel, sadly, because classes can't be called | |
// with an user supplied context* | |
classes.forEach(klass) => { |
......................................................................................................SSSSSSSSSSSSSSSSSSSSSSSSSS..........................................SS........................SS......................................................................................................................................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.............................................................................................S..S.....................................................................................................................................................................................................................F...................................................................................................................................S..................S....SSSSSS...SSSSSS.........................................................SSSSSSSSSSSSSSSSSSSS....................................................................................S....S.. |
(function() { | |
var consoleError, | |
renderLoop, | |
queue = [], | |
rAF = window.requestAnimationFrame || function(fn) { | |
setTimeout(fn, 0) | |
} | |
if (typeof console === "object" && | |
typeof console.error === "function") { |
$$("tbody td:first-child:not([colspan])").forEach(function use24hclock(td) { | |
td.textContent = moment(td.textContent, "hh:mm a").format("HH:mm") | |
}) | |
function markAired() { | |
var date, i, style, td, tr, | |
tds = Array.from(document.querySelectorAll( | |
"tbody td:first-child:not([colspan])" | |
)) |