Skip to content

Instantly share code, notes, and snippets.

@jlevy
jlevy / research-2026-06-06-portable-concurrent-sqlite.md
Created June 6, 2026 22:29
Portable, server-free, concurrent SQLite — research doc (snaplog)
title Portable, Server-Free, Concurrent SQLite for Local Applications
description A domain-agnostic reference on building a locally-friendly, portable, thread-safe, NFS-safe, data-loss-safe usage pattern (package/wrapper/adapter) around SQLite — covering the locking/journaling/filesystem background, the session/changeset extension, source-grounded node:sqlite findings, the prior-art landscape, and a validated snapshot-publish and transaction-envelope design with a working prototype.
author Claude Code agent (finterm), with prior survey work by Joshua Levy and LLM agents

Research: Portable, Server-Free, Concurrent SQLite for Local Applications

@jlevy
jlevy / research-2026-06-06-sqlite-file-coordination.md
Last active June 6, 2026 22:30
Research doc from codex-gpt-5.5: SQLite File Coordination for Portable Server-Free Databases [codex-gpt-5.5]

title: "Research: SQLite File Coordination for Portable Server-Free Databases" description: Consolidated research on using ordinary SQLite database files as durable, portable, server-free archives with cooperative WAL-free concurrency, safe backup, and cross-platform file coordination. author: Levy + Codex status: "Complete: background consolidated; recommendations tentative" related:

  • ../specs/active/plan-2026-06-06-sqlite-session-safe-package.md
  • research-2026-05-15-secure-file-backed-tool-access.md
  • research-2026-04-19-filestore-mount-alternatives.md
  • research-2026-04-09-large-tree-and-nfs-browser-monitoring.md

Standard Documentation Guidelines

Version: v0.3 (last update 2026-05-05)
Joshua Levy (github.com/jlevy)

Purpose

Both agents and humans benefit from accurate, maintained documentation. These are brief and general guidelines for humans and agents when writing and organizing code, text files, and documentation.

@jlevy
jlevy / fetch_rejected_prs.py
Created December 3, 2025 04:54
Fetch rejected PRs and maintainer feedback from GitHub repos
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""
Fetch rejected PRs and maintainer comments from a GitHub repo.
Uses `gh` CLI for authentication (must be logged in via `gh auth login`).
@jlevy
jlevy / fetch_rejected_prs.py
Created December 3, 2025 04:51
Fetch rejected PRs and maintainer feedback from GitHub repos
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""
Fetch rejected PRs and maintainer comments from a GitHub repo.
Uses `gh` CLI for authentication (must be logged in via `gh auth login`).
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = "==3.13"
# dependencies = [
# "requests>=2.32.3",
# "rich>=14.0.0",
# "markdownify>=1.1.0",
# "readabilipy>=0.3.0",
# ]
# ///
@jlevy
jlevy / fnm.py
Last active January 8, 2025 09:49
xonsh xontrib for fnm (for node version management)
"""
xontrib for fnm (Fast Node Manager) integration with xonsh shell.
Fnm is a good replacement for nvm and is compatible with .nvmrc.
Currently fnm doesn't support xonsh directly. This parses the bash output
of fnm and uses it within xonsh.
"""
import subprocess
@jlevy
jlevy / uniquifier.py
Last active May 6, 2024 21:18
Tiny class that saves you effort when maintaining a set of unique names.
from typing import Set
from typing import NamedTuple
class Key(NamedTuple):
name: str
group: str
class Uniquifier:
@jlevy
jlevy / friendlyTruncate.spec.ts
Last active July 12, 2023 21:29
Human-friendly truncation of strings in TypeScript, by character, word, and paragraph, with Markdown compatibility
import {
MARKDOWN_FORMAT_CHARS,
truncate,
truncateCondensed,
truncateOnParagraphs,
truncateOnWords,
} from './friendlyTruncate';
describe('truncate', () => {
it('returns the input if it is null or shorter than the limit', () => {
@jlevy
jlevy / logPerf.ts
Last active June 16, 2023 17:59
Client-side convenience wrapper function to log when a (sync or async) function takes a while to run
/**
* Convenience for timing specific function calls and logging to console.
* Works with both synchronous and asynchronous functions and also logs
* if the function exited or had an exception. minMs is the minimum number
* of milliseconds that the function must take to be logged.
*
* Usage example: To log when an expression like
*
* const result = someFunction(arg1, arg2);
*