Skip to content

Instantly share code, notes, and snippets.

View randName's full-sized avatar
🔞
nsfw (the OSHA kind)

Shun Git randName

🔞
nsfw (the OSHA kind)
View GitHub Profile
{
"window.menuBarVisibility": "classic",
"editor.tabSize": 2,
"editor.insertSpaces": false,
"editor.mouseWheelZoom": true,
"editor.lineNumbers": "relative",
"editor.accessibilitySupport": "off",
"editor.acceptSuggestionOnEnter": "off",
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.unicodeHighlight.nonBasicASCII": false,
@randName
randName / init.sh
Last active May 23, 2026 09:22
pi init
#!/bin/sh
apk add --no-cache jq git curl tmux gettext-envsubst
git clone ${PI_CONFIG_REPO} .pi
.pi/install.sh
@randName
randName / README.md
Last active January 27, 2026 06:57
sorting of strings containing numbers
@randName
randName / README.md
Last active February 6, 2025 14:22
node WebSocket server

WebSocket server in node

@randName
randName / CORS.md
Last active March 10, 2022 06:29
cors

CORS

@randName
randName / version-checker.md
Last active January 20, 2026 03:01
package versions

Latest versions

name version
vue npm
vite npm
@randName
randName / README.md
Last active February 4, 2021 04:19
yet another rate limiting wrapper

Yet Another Rate-limiting Wrapper

rateLimit(fn[, options])

  • fn <Function> Function that will be rate-limited
  • options <Object> Configurable options
    • max <number> Maximum number of active instances. Default: 10
    • delay <number> Minimum delay between calls in milliseconds. Default: 10
  • Returns: <Function> with the same signature as fn

Example

@randName
randName / demo.js
Created March 18, 2020 09:55
GLSL-style swizzling in Javascript
const a = vec(1, 2, 3, 4)
console.log(a.length, a)
// standard property access
console.log(a[0], a.y, a.b, a.t)
// swizzling
console.log(a.xy, a.zyx, a.xxyy)
@randName
randName / README.md
Created March 17, 2020 06:57
test-embed-bug

test-embed-bug

Testing embedded content

embed

embed

source

source

from tkinter import *
from PIL import ImageTk,Image
import time
import os
targetImageWidth = 850
targetImageHeight = 400
inputImageWidth = 0
inputImageHeight = 0