Skip to content

Instantly share code, notes, and snippets.

@BrunoWinck
BrunoWinck / knv-unit.s
Created December 15, 2024 23:31
Web component for units conversion
class KnvUnit extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.render();
}
@BrunoWinck
BrunoWinck / recup-storify.js
Created May 5, 2018 19:18
NodeJS Script derived from Cogdog storify extractor https://github.com/cogdog/storify-extractor, no dependency
// Derived from https://github.com/cogdog/storify-extractor
// Same License
// Usage: node recup-storify.js <url of story>
// will save a file <story name>.html
function getAllMatches(regex, text) {
// ----h/t https://stackoverflow.com/a/29999424/2418186
if (regex.constructor !== RegExp) {
throw new Error('not RegExp');
Verifying that +brunowinck is my blockchain ID. https://onename.com/brunowinck