Major Node Changes
This document is a short list of changes in Node.js' major releases. It does not cover point releases, just e.g., v13, v14 and so on.
// This is now a library: | |
// ... source on GitHub: https://github.com/samthor/viz-observer | |
// ... package on npm: https://www.npmjs.com/package/viz-observer |
This document is a short list of changes in Node.js' major releases. It does not cover point releases, just e.g., v13, v14 and so on.
/** | |
* @param {!Element=} | |
* @return {!Array<!Element>} containing focused element, deepest first | |
*/ | |
function getActive(t = document.activeElement || document.body) { | |
if (t.activeElement) { | |
t = t.activeElement; | |
} | |
if (t.shadowRoot) { | |
return [...getActive(t.shadowRoot), t]; |
<!-- | |
Copyright 2020 Google LLC. | |
Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
use this file except in compliance with the License. You may obtain a copy of | |
the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
package loggerwrap | |
import ( | |
"context" | |
"fmt" | |
"net/http" | |
"os" | |
"strings" | |
"cloud.google.com/go/logging" |
let configured = false; | |
let finished = false; | |
const methodsToCall = []; | |
function setup() { | |
const Eleventy = require("@11ty/eleventy"); | |
const originalWrite = Eleventy.prototype.write; | |
Eleventy.prototype.write = async function(...args) { | |
const out = await originalWrite.apply(this, args); |
#!/usr/bin/env python | |
import logging | |
import subprocess | |
import re | |
import sys | |
import datetime | |
RE_SPACES = re.compile('\s+') |
import fs from 'fs'; | |
// as per https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/CSSModules/v1Explainer.md | |
export default function cssModules() { | |
return { | |
name: 'css-modules', | |
async load(id) { | |
if (!id.endsWith('.css')) { | |
return; |
#!/bin/bash | |
command_exists() { | |
type "$1" &> /dev/null | |
} | |
for X in "$@"; do | |
if [ ${X: -4} == '.png' ]; then | |
if command_exists zopflipng; then | |
zopflipng "$X" "$X" |
#!/bin/bash | |
# Useful bash functions. This is sourced by the environment file. | |
# These are available to scripts, but you shouldn't use them in scripts if you | |
# want them to be portable. | |
# Usage: pathremove /path/to/bin [PATH] | |
# Eg, to remove ~/bin from $PATH | |
# pathremove ~/bin PATH | |
function pathremove { | |
local IFS=':' |