View use_rulers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$} from 'voby'; | |
import {useCanvasOverlay, useEffect, useEventListener, useRect, useResolved} from '~/hooks'; | |
/* TYPES */ | |
type Line = { | |
offset: number |
View nitropack_duplicates_report.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- string_decoder | |
- 1.1.1 | |
- Repository: https://github.com/nodejs/string_decoder | |
- Readme: https://raw.githubusercontent.com/nodejs/string_decoder/master/README.md | |
- License: https://raw.githubusercontent.com/nodejs/string_decoder/master/LICENSE | |
- 1.3.0 | |
- Repository: https://github.com/nodejs/string_decoder | |
- Readme: https://raw.githubusercontent.com/nodejs/string_decoder/master/README.md | |
- License: https://raw.githubusercontent.com/nodejs/string_decoder/master/LICENSE | |
- source-map |
View sieve.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sieve = ( size ) => { | |
//TODO: add windowing for the buffer, allocating a fixed-size buffer that gets repopulated when needed | |
const buffer = new Uint8Array ( Math.ceil ( size / 8 ) ).fill ( 255 ); | |
const primes = []; | |
let prev = 2; |
View use_boxer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$$} from 'voby'; | |
import {useEffect} from '~/hooks'; | |
/* MAIN */ | |
const useResizeObserver = ( ref: $<Element | undefined>, fn: ResizeObserverCallback, options: ResizeObserverOptions = {} ): void => { |
View fast_css_reset.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:where(abbr), :where(address), :where(area), :where(article), :where(aside), :where(audio), :where(b), :where(base), :where(bdi), :where(bdo), :where(big), :where(blockquote), :where(body), :where(br), :where(caption), :where(cite), :where(code), :where(col), :where(colgroup), :where(data), :where(datalist), :where(dd), :where(del), :where(details), :where(dfn), :where(dialog), :where(dl), :where(dt), :where(em), :where(embed), :where(fieldset), :where(figcaption), :where(figure), :where(footer), :where(form), :where(h1), :where(h2), :where(h3), :where(h4), :where(h5), :where(h6), :where(head), :where(header), :where(hgroup), :where(hr), :where(i), :where(input), :where(ins), :where(kbd), :where(keygen), :where(label), :where(legend), :where(li), :where(link), :where(main), :where(map), :where(mark), :where(menu), :where(menuitem), :where(meta), :where(meter), :where(nav), :where(object), :where(ol), :where(optgroup), :where(option), :where(output), :where(param), :where(picture), :where(pre), :where(progress |
View lag_bar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import {$, $$, useEffect, useInterval} from 'voby'; | |
/* STYLE */ | |
css` | |
:root { | |
--lag-bar-color-bg: var(--color-black-bg); |
View range_slider.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
import './styles.scss'; | |
import _ from '_'; | |
import {$, $$} from 'voby'; | |
import {If} from '~/components'; | |
import {useActiving, useDragger} from '~/hooks'; | |
import type {Props} from './types'; |
View fast-npm-run.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 20x faster replacement for "npm run" | |
# - It supports scripts executing a built-in shell function | |
# - It supports scripts executing a binary found in PATH | |
# - It supports scripts executing a binary found in node_modules | |
# - It supports passing arguments and options to scripts | |
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer) | |
# - It adds ./node_modules/.bin to the $PATH | |
# - It handles gracefully when a script has not been found | |
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run" |
View lzw.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as assert from 'node:assert'; | |
import Buffer from 'node:buffer'; | |
import fs from 'node:fs'; | |
import {deflateSync, inflateSync} from 'fflate'; | |
import * as LZW from '@amoutonbrady/lz-string' | |
import * as Huffy from 'huffy'; | |
import Base64 from 'radix64-encoding'; | |
const encoder = new TextEncoder (); |
View hash-ish.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* IMPORT */ | |
const crypto = require ( 'crypto' ); | |
/* MAIN */ | |
// const hash = str => { | |
// const PRIMEn = 115792089237316195423570985008687907853269984665640564039457584007913129639349n; // 2**256-587 - https://primes.utm.edu/lists/2small/200bit.html | |
// const SEEDn = 340282366920938463463374607431768211099n; // 2**128-357 - https://primes.utm.edu/lists/2small/100bit.html |
NewerOlder