Files
dark-lord/lib/webring.ts
drjones 78a071ba02 Harden onion boot flow and deepen site surfaces
Add persistent onion key backup and restore, improve startup resilience, and flesh out the major site verticals with richer navigation, search coverage, and operator documentation.

Made-with: Cursor
2026-04-07 21:35:52 -07:00

41 lines
1.5 KiB
TypeScript

export type WebringSeed = {
slug: string;
title: string;
tagline: string;
};
export const featuredWebringSeeds: WebringSeed[] = [
{ slug: "trees", title: "Trees (Uncensored)", tagline: "The only site brave enough to talk about trees." },
{ slug: "teapot-index", title: "The Teapot Index", tagline: "Independent reviews of teapots that may or may not be sentient." },
{ slug: "museum-of-dust", title: "Museum of Dust", tagline: "Curated particles. Rare specimens. Absolutely not haunted." },
{ slug: "cloud-tax", title: "Cloud Tax Authority", tagline: "Pay your cloud taxes. Or face sky penalties." },
{ slug: "receipt-poetry", title: "Receipt Poetry", tagline: "We turn questionable purchases into sonnets." },
{ slug: "night-noodles", title: "Night Noodles Hotline", tagline: "Anonymous noodles. Encrypted broth." },
{ slug: "sandwich-law", title: "Sandwich Law Review", tagline: "Case law, deli precedent, mustard jurisprudence." },
{ slug: "worms", title: "Worms & Governance", tagline: "Elected officials. Unelected worms. Same energy." },
];
export function hashSlugToInt(slug: string) {
let h = 2166136261;
for (let i = 0; i < slug.length; i++) {
h ^= slug.charCodeAt(i);
h = Math.imul(h, 16777619);
}
return h >>> 0;
}
export function pick<T>(arr: T[], seed: number) {
return arr[seed % arr.length];
}
export function pseudoRand(seed: number) {
let x = seed || 123456789;
return () => {
x ^= x << 13;
x ^= x >>> 17;
x ^= x << 5;
return (x >>> 0) / 4294967296;
};
}