Skip to content

Instantly share code, notes, and snippets.

View paulsmith's full-sized avatar
😀
Hi, friends

Paul Smith paulsmith

😀
Hi, friends
View GitHub Profile
@paulsmith
paulsmith / README.md
Last active May 18, 2026 17:10
Add Project Gutenberg links to a list of the Guardian's top 100 novels

Guardian Top 100 → free e-book links

Scripts that scan the Guardian's "100 best novels of all time" list and link each entry to a free e-book source. All 100 entries are linked: 43 to Project Gutenberg (the public-domain works) and 57 to OpenLibrary (still in copyright but borrowable via Internet Archive's controlled-lending program, which is the closest open-data analog to a Libby-style library link).

The list (as a markdown note) has only titles, no authors, so the scripts carry a hand-curated (title, author) table to disambiguate common titles

@paulsmith
paulsmith / SKILL.md
Created March 10, 2026 18:08
Claude Code skill for maintaining my jjify patchset on superpowers
name superpowers-fork
description Use when syncing Paul's jj fork of obra/superpowers with upstream, rebasing the jjify patchset, or reviewing upstream for new git references that need converting to jj equivalents. Use when Paul says to update superpowers, sync the fork, or rebase jjify.

Maintaining the Superpowers jj Fork

Sync Paul's jj-adapted fork of obra/superpowers with upstream and maintain parity. The fork replaces all Git-specific commands and workflows with jj equivalents.

REQUIRED: Use the jj-workflow skill for all VCS operations.

@paulsmith
paulsmith / SKILL.md
Created February 27, 2026 21:21
Hammerspoon ClipboardTool skill for Claude Code — query clipboard history from the command line
name hammerspoon-clipboard
description Use when you need to access, list, search, or retrieve items from the user's clipboard history managed by Hammerspoon's ClipboardTool spoon

Hammerspoon Clipboard

Access the user's clipboard history (managed by Hammerspoon's ClipboardTool spoon) from the command line.

Helper Script

@paulsmith
paulsmith / jj-unsquash-example.md
Created February 6, 2026 21:01
jj-unsquash: recover pre-squash commit history from jj's operation log

jj-unsquash example

Setup

Start with a jj repo. Create a workspace, make some commits, then squash them down:

$ jj workspace add --name bar ../bar
$ cd ../bar
@paulsmith
paulsmith / ghostty_splits.applescript
Created July 15, 2025 15:41
Ghostty terminal emulator AppleScript for creating custom split layout
-- ABOUTME: AppleScript to set up Ghostty terminal with custom split layout
-- ABOUTME: Creates left column full height, right column with two vertical splits
on makeNewWindow()
if application "Ghostty" is running then
tell application "System Events"
set visible of application process "Ghostty" to true
delay 0.1
end tell
end if
// Written by claude-3-5-sonnet-20241022, based on https://github.com/paulsmith/aoc2024/blob/main/03/solution.zig
const std = @import("std");
const startsWith = std.mem.startsWith;
const input = @embedFile("input.txt");
const OpType = enum {
mul,
do_op,
dont_op,
@paulsmith
paulsmith / bufscan.go
Created November 20, 2024 00:52
buffered Go scanner
package bufscan
type GoToken struct {
Pos token.Pos
Tok token.Token
Lit string
}
type BufGoScanner struct {
scan *scanner.Scanner
@paulsmith
paulsmith / LLM.md
Created May 2, 2023 13:47 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

/**
* 8x8 monochrome bitmap fonts for rendering
* Author: Daniel Hepper <daniel@hepper.net>
*
* License: Public Domain
*
* Based on:
* // Summary: font8x8.h
* // 8x8 monochrome bitmap fonts for rendering
* //
enum Kind {
File,
Directory,
}
struct Entry {
name: String,
kind: Kind,
size: usize,
parent: Option<usize>,