Skip to content

Instantly share code, notes, and snippets.

# If there is no version tag in git this one will be used
VERSION = 0.1.0
# Need to discard STDERR so get path to NULL device
win32 {
NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL
} else {
NULL_DEVICE = /dev/null
}
@grassator
grassator / html-spec-titles.md
Last active May 29, 2020 18:37
Add sticky section headers to html spec

1. Add the following URL to your bookmarks

javascript:(()%20%3D%3E%20%7B%20const%20style%20%3D%20document.createElement(%22style%22)%3B%20style.textContent%20%3D%20%22h5%20%7B%20position%3A%20sticky%3B%20top%3A%200%3B%20background%3A%20white%3B%20border-bottom%3A%201px%20solid%20%23eee%3B%20z-index%3A%20100%20%7D%20h6%20%7B%20position%3A%20sticky%3B%20top%3A%201.4em%3B%20background%3A%20white%3B%20border-bottom%3A%201px%20solid%20%23eee%3B%20z-index%3A%20101%20%7D%22%3B%20document.head.append(style)%3B%20%7D)()

To do that you can just bookmark current page and then change the bookmark URL to the javascript one above.

@grassator
grassator / forj.js
Last active June 24, 2020 19:18
Forth-like DSL for JavaScript
// Copyright 2020 Dmitriy Kubyshkin
// MIT license
const forj = () => {
const stack = [];
const controlStack = [1];
const last = (stack) => stack.length && stack[stack.length - 1];
function interpreter(arg) {