Skip to content

Instantly share code, notes, and snippets.

View charlieroberts's full-sized avatar

charlie roberts charlieroberts

View GitHub Profile
(((accru|spous)i|(adorn|align|amend|assay|b(eep|ray)|bawl|belay|bilk|bl(eat|eep|oop|urt)|braid|bruit|c(aulk|h(arm|aw|eep)|heat|hurn|oil)|caper|clack|clamp|cli(mb|nk)|croon|d(ec(ay|oy)|unk)|endow|flay|foray|frown|gait|gasp|gawp|glean|gr(asp|eet)|groom|hail|heist|hint|hoard|j(eer|ink)|kneel|l(isp|o(af|ot)|urk)|maim|maul|meld|moil|mump|oust|pl(ait|ead)|pr(ay|ey|ink)|prowl|quilt|r(aid|ant|eam|oam|olf)|scold|sculk|shark|shear|shirk|shout|skink|skirt|skulk|snook|snort|sorn|sp(ank|ew|urn)|spell|spiel|spo(ol|ut)|spray|stain|stint|stomp|stoo[kp]|str(ay|oy)|swarm|teem|tempt|thump|tout|trail|tweet|usurp|w(ank|oof)|waken|wreak|y(arn|awn|elp)|yearn|yowl)i|(batc|belc|ditc|fetc|filc|lurc|mooc|notc|shus|slas|wenc)hi|(chair|stunt)i|(clasp|learn)i|(codd|dabb)i|(embow|scalp)i|(hoax|nosh)i|(moan|scorn|thank)i|(perus|refut)i|(shew|strew)i|(slack|slick)i|(striv|thriv)i|abyi|admiri|adori|advisi|aidi|amassi|ampi|antei|argui|arisi|arousi|autoi|awardi|awi|bachi|baiti|bangi|banni|bargi|bathi|bayi|berimi|blanki|b
lari|blendi|blessi|blit
@munrocket
munrocket / wgsl_noise.md
Last active March 10, 2025 12:00
WGSL Noise Algorithms

WGSL Noise Algorithms

Good and fast integer hash

// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
    var h = n * 747796405u + 2891336453u;
    h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
    return (h >> 22u) ^ h;
}
@yoonhoGo
yoonhoGo / alacritty.yml
Last active January 29, 2024 16:18
alacritty settings
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@nothingismagick
nothingismagick / caret.js
Last active December 15, 2024 18:17
Small script to detect caret pixel position in contenteditable div
/**
* Get the caret position in all cases
*
* @returns {object} left, top distance in pixels
*/
getCaretTopPoint () {
const sel = document.getSelection()
const r = sel.getRangeAt(0)
let rect
let r2
@efairbanks
efairbanks / kfs_turbines.frag
Created March 25, 2018 20:20
Fancy KFS fractal shapes
#define EPSILON 0.001
precision mediump float;
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform sampler2D backbuffer;
vec2 uv2p(vec2 uv) {return ((uv*resolution) * 2. - resolution) / min(resolution.x, resolution.y);}
vec2 p2uv(vec2 p) {return ((p*min(resolution.x, resolution.y))+resolution)/(2.*resolution);}
@rumblesan
rumblesan / takeaway.md
Last active December 9, 2020 16:51
Take away doc for the HipHop and Code workshop
@charlieroberts
charlieroberts / genish_vs_waapi_benchmarks.html
Last active April 21, 2022 02:58
Benchmark comparisons of common synthesis tasks between Genish.js and the Web Audio API, for the 2017 Web Audio Conference
<!doctype html>
<html>
<head>
<!-- npm install mathjs [email protected] -->
<script src='./node_modules/genish.js/dist/gen.lib.js'></script>
<script src='./node_modules/mathjs/dist/math.js'></script>
</head>
<body></body>
<script>
if( typeof OfflineAudioContext === 'undefined' ) window.OfflineAudioContext = webkitOfflineAudioContext
@subfuzion
subfuzion / curl.md
Last active April 16, 2025 09:14
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.