Skip to content

Instantly share code, notes, and snippets.

@nichoth
nichoth / constants.ts
Last active October 13, 2025 17:22
Some Constants, em dashes and things
export const NDASH = '\u2013'
export const EM_DASH = '\u2014'
export const NBSP = '\u00A0'
export const ELLIPSIS = '\u2026'
@nichoth
nichoth / grid.css
Last active September 17, 2025 03:56
Responsive grid
/*
see https://smolcss.dev/#smol-css-grid
*/
.smol-css-grid {
--min: 15ch;
--gap: 1rem;
display: grid;
grid-gap: var(--gap);
@nichoth
nichoth / index.html
Created August 17, 2025 02:00 — forked from pvh/index.html
Automerge unbundled vanilla example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Automerge (Vanilla JS, Unbundled) Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script type="module">
// The ?bundle-deps here is very dodgy...
@nichoth
nichoth / signals.html
Created August 13, 2025 21:57 — forked from KonnorRogers/signals.html
Lite Signals
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Signals</title>
</head>
<body>
<button id="decrement">
-
@nichoth
nichoth / puuppeteer3.js
Last active June 11, 2025 21:52
more puppeteer
// @ts-check
import puppeteer from 'puppeteer'
import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const ANIMATION_FRAMES = 30 // 1/2 second
const outputDir = path.join(__dirname, '..', 'screenshots')
@nichoth
nichoth / puppeteer2.js
Created June 11, 2025 19:11
Puppeteer again
// @ts-check
import puppeteer from 'puppeteer'
import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const URL = 'https://nolaai.webflow.io/'
@nichoth
nichoth / index.js
Last active June 11, 2025 18:52
puppeteer
import puppeteer from 'puppeteer'
import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const URL = 'https://nolaai.webflow.io/'
const browser = await puppeteer.launch({
accordion-group {
background-color: #f7f7f7;
border-radius: 0.25em;
display: block;
margin-block-end: 1.5em;
padding: 0.5em 1em;
width: 100%;
}
accordion-group [accordion-trigger] {
@nichoth
nichoth / LICENSE.md
Last active May 20, 2025 18:45
Big Time License

Big Time Public License

Version 2.0.2

Purpose

These terms let you use and share this software for noncommercial purposes and in small business for free, while also guaranteeing that paid licenses for big businesses will be available on fair, reasonable, and nondiscriminatory terms.

Acceptance