Skip to content

Instantly share code, notes, and snippets.

@cdata
cdata / good.sh
Last active April 10, 2026 21:07
Good file
#!/usr/bin/env bash
#
# Ephemeral VM bootstrap: Determinate Nix, OpenSSH (high port), Tailscale.
#
# Required:
# TAILSCALE_AUTH_KEY - Tailscale pre-auth key
#
# Optional:
# SSH_PORT - Port for sshd (default: 24000)
# SSH_AUTHORIZED_KEYS - Public keys to append to ~/.ssh/authorized_keys

A contract penned on a sheet of magical vellum in Farglen's precise, gear-tooth script. The text gleams in gold filigree — every letter, every flourish laid down by a pencil of Farglen's own design, its tip leaving luminous trails wherever it passes over the skin. The golden lines catch light that isn't there, shifting faintly as though the ink remembers the hand that wrote it.


The Compact of Thirteen Callings

Being a Binding Agreement of Service Between Parties, Witnessed by the Turning of Gears and the Counting of Hours


@cdata
cdata / xcodeinstaller.sh
Created February 9, 2011 01:02
Snippet for unattended installation of XCode
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "
@cdata
cdata / pokemon_artifacts.csv
Last active May 28, 2025 04:50
CSV dump of Pokemon artifacts
We can't make this file beautiful and searchable because it's too large.
the,of,is,cause
pokemon/avatar_female,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,string:https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/204.png,
pokemon/avatar_female_shiny,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,string:https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/204.png,
pokemon/avatar_male,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,string:https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/204.png,
pokemon/avatar_male_shiny,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,string:https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/204.png,
pokemon/name,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,string:pineco,
pokemon/stat/attack,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,uint:65,
pokemon/stat/defense,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,uint:90,
pokemon/stat/hp,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,uint:50,
pokemon/stat/special-attack,1SkpVtzgQxBRwcw6TB8tX4G41GnZRqJ7XEhSRZy4sVE,uint:35,
/**
* Generate the BLAKE3 hash of some input bytes
*/
export function makeReference(bytes: Uint8Array): Uint8Array;
/**
* Convert the input bytes to a string using base58 encoding
*/
export function encode(bytes: Uint8Array): string;
/**
* Decode base58-encoded bytes from a string
pico-8 cartridge // http://www.pico-8.com
version 42
__lua__
x = 16
vx = 0
y = 8
vy = 0
camera_x = 0
#version 300 es
precision highp float;
precision highp int;
struct MeshX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OR4XAZLTX {
mat3x4 world_from_local;
mat3x4 previous_world_from_local;
mat2x4 local_from_world_transpose_a;
float local_from_world_transpose_b;
@cdata
cdata / three-clone-gltf.js
Created November 8, 2017 23:26
A quick hack to clone a Three.js GLTF scene without re-loading or re-parsing the source.
const cloneGltf = (gltf) => {
const clone = {
animations: gltf.animations,
scene: gltf.scene.clone(true)
};
const skinnedMeshes = {};
gltf.scene.traverse(node => {
if (node.isSkinnedMesh) {
/**
* This is mixin function is designed to be applied to a class that inherits
* from HTMLElement. It makes it easy for a custom element to coordinate with
* the :focus-visible polyfill.
*
* @param {Function} SuperClass The base class implementation to decorate with
* implementation that coordinates with the :focus-visible polyfill
*/
export function FocusVisiblePolyfillMixin(SuperClass) {
var coordinateWithPolyfill = function(instance) {
@cdata
cdata / 2d-simplex-noise.wgsl
Created December 20, 2021 07:37
2D Simplex Noise in WGSL (transcribed from https://github.com/ashima/webgl-noise)
//
// Description : WGSL 2D simplex noise function
// Author : Ian McEwan, Ashima Arts
// Maintainer : ijm
// Lastmod : 20110822 (ijm)
// License :
// Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
//