Skip to content

Instantly share code, notes, and snippets.

View nicholaswmin's full-sized avatar
💭
may be slow to respond.

Nicholas Kyriakides nicholaswmin

💭
may be slow to respond.
View GitHub Profile
@nicholaswmin
nicholaswmin / README.md
Last active July 9, 2026 01:38
zsh function mapping files to public stable URL

s3.zsh

upload file(s) to [S3][aws-s3]

install

tmp=$(mktemp /tmp/s3-install.XXXXXX) &&
curl -fsSL -m 30 -o "$tmp" \
 https://gist.githubusercontent.com/nicholaswmin/ddbf7d5da7e3dab95c38f704b6d98631/raw/install.zsh &&
@nicholaswmin
nicholaswmin / ok.zsh
Created July 8, 2026 22:59
TAP-14 compliant zsh test runner; 1 file
#!/usr/bin/env zsh
#
# ok.zsh -- tiny TAP 14 test runner for zsh
#
# Author: https://github.com/nicholaswmin
# License: MIT
#
# Discover and run *.test.zsh files. Each file runs in its own subshell
# with the assertion API preloaded, so test files call the assertors
# directly -- no `source` line.
@nicholaswmin
nicholaswmin / unbind.js
Last active May 25, 2026 14:41
Free up a TCP port by killing all processes listening on it, properly
/**
* Free-up a TCP port by killing all processes listening on it.
* License: The MIT-0 License; no attribution required
*
* - Finds all processes listening on specified port,
* sends a SIGTERM signal to each, then polls until all die,
*. or the grace period expires, SIGKILL-ing all survivors.
* - Returns: array of killed PIDs, empty if none
*
* await unbind(3000) // => [] or [pid, ...]
@nicholaswmin
nicholaswmin / README.md
Created February 21, 2026 06:52
autopen — simulate Apple Pencil/Touch/Pointer input (Bitpaper experiments)

autopen

Simulate Apple Pencil Pro input on a DOM element. Dispatches realistic Pointer, Mouse, and Touch events.

Usage

import { Autopen } from './index.js'
@nicholaswmin
nicholaswmin / wir.md
Last active February 3, 2026 11:49
iOS Safari remote control via WIR

WebKit Inspector - iOS Simulator

Remote control of iOS Safari Web Inspector.
Works via socket, injecting commands following WIR (WebKit Inspector Remote) -
an internal yet not secret protocol that mimics CDP.
Less brittle than Appium, no dependencies.

Quick Start

  1. Boot simulator and open page:
@nicholaswmin
nicholaswmin / color-mac.md
Created January 12, 2026 02:17
HIG: Color

[Human Interface Guidelines: Color][hig-color]

  • Don't redefine semantic meaning: separator is not a label.
  • Light/Dark map to Light|Dark mode while HiCon map to High Contrast + mode
Name Light Dark HiCon Light HiCon Dark
systemBlue ![][sw-007AFF] #007AFF ![][sw-0A84FF] #0A84FF ![][sw-0796E0] #0796E0 ![][sw-409CFF] #409CFF
systemGreen ![][sw-28CD41] #28CD41 ![][sw-32D74B] #32D74B ![][sw-05AB1E] #05AB1E ![][sw-31DE4B] #31DE4B
systemIndigo ![][sw-5856D6] #5856D6 ![][sw-5E5CE6] #5E5CE6 ![][sw-3634A3] #3634A3 ![][sw-7D7AFF] #7D7AFF
@nicholaswmin
nicholaswmin / es-next.md
Last active March 9, 2026 21:36
rolling styleguide

es.next

style guide for modern JS
[nicholaswmin][author]

targets: Node LTS 24, latest Chrome, Safari 26.3 (macOS/iOS)

Contents

@nicholaswmin
nicholaswmin / zsh-guide.md
Last active July 25, 2025 04:57
user-centric zsh scripts

zsh style guide

guidelines for concise [zsh][zsh-wiki] scripts

authors: [nicholaswmin][authorgh] - The [MIT][mit-lcns] License.

The keywords must/must not are to be interpreted as described in [RFC-2119][rfc-2119].
This formality is kept to a minimum because this document is meant to be LLM-parseable;
in other cases, your own unique context dictates their applicability.

@nicholaswmin
nicholaswmin / vouch.zsh
Last active May 23, 2025 15:59
Creates and automatically trusts self-signed SSL on macOS
#!/usr/bin/env zsh
autoload -U colors && colors
# Check for correct shell
if [ -z "$ZSH_VERSION" ]; then
echo "Error: This script must be run with zsh, not sh or bash"
echo "Please run with: zsh ./vouch.zsh install"
exit 1
fi
@nicholaswmin
nicholaswmin / zed-extsync.zsh
Last active May 23, 2025 08:00
declaratively list all installed zed.dev extensions in settings.json
#!/usr/bin/env zsh
# ext-sync.zsh
#
# Authors: 2025 - nicholaswmin - MIT
#
# Declaratively lists all installed zed.dev extensions
# in `settings.json` under `auto_install_extensions`
# - Run once before backing up dotfiles.
# - https://zed.dev/docs/configuring-zed#auto-install-extensions
#