Skip to content

Instantly share code, notes, and snippets.

View jaredh159's full-sized avatar

Jared Henderson jaredh159

View GitHub Profile
@jaredh159
jaredh159 / flowtype-wire-format-migration.md
Created March 12, 2026 19:05
FlowType wire format migration: why the frozen tiers exist

FlowType Wire Format Migration

Commits: 2bcc763f (macro migration) · 322bc5f8 (wire format fix)

What Happened

This codebase originally used a runtime code-generation system to produce TypeScript- compatible Codable implementations for Swift enums with associated values. The generated files (Enums+Codable.swift, *+Codable.swift) emitted a cross-language-friendly format where an enum case with a payload serializes as {"case": "foo", "value": }.

@jaredh159
jaredh159 / md-blockquote-diff.md
Last active March 4, 2026 12:10
markdown compound

Asciidoctor renders these two differently, causing the markdown version to be treated as a compound block quote with extra wrapping.

> I hold it that a little rebellion now and then is a good thing,
> and as necessary in the political world as storms in the physical.
> -- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11

"I hold it that a little rebellion now and then is a good thing,
and as necessary in the political world as storms in the physical."
-- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11
@jaredh159
jaredh159 / mini.svg
Created January 23, 2026 13:40
test remote svg for asciidork, don't delete
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaredh159
jaredh159 / english-friend.sql
Created July 2, 2025 17:57
Insert Narrow Path Quotes
INSERT INTO "public"."np_quotes"(
"id",
"lang",
"is_friend",
"author_name",
"quote",
"friend_id",
"document_id",
"created_at",
"updated_at"
@jaredh159
jaredh159 / reset-all-perms.sh
Last active February 17, 2025 15:58
reset all macos permissions for onboarding redo test
sudo tccutil reset All
sudo tccutil reset All WFN83LM943.com.netrivet.gertrude.app
sudo tccutil reset All com.netrivet.gertrude.app
sudo tccutil reset All .com.netrivet.gertrude.app
rm -rf ~/Library/Preferences/*
sudo rm -rf /Library/Preferences/*
sudo rm -rf /Library/Application\ Support/com.apple.TCC
# screen recording
sudo rm -rf ~/Library/Group\ Containers/group.com.apple.replayd
systemextensionsctl reset
@jaredh159
jaredh159 / release.swift
Created February 3, 2025 17:20
send-new-release-marketing-email.md
Task {
let postmark = get(dependency: \.postmark)
let db = get(dependency: \.db)
let admins = try await Admin.query()
.where(.not(.equals(
.subscriptionStatus,
.enum(Admin.SubscriptionStatus.unpaid)
)))
@jaredh159
jaredh159 / links_test.rb
Created December 21, 2024 12:10
asciidork links_test.rb compat as of 12/21/24
@jaredh159
jaredh159 / lulu-fail2.sh
Created December 18, 2024 19:39
another lulu fail
curl --silent -X POST \
--location 'https://api.lulu.com/print-job-cost-calculations/' \
--header 'Authorization: Bearer NOT-REAL' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
--data '{
"line_items": [
{
"page_count": 32,
"pod_package_id": "0600X0900BWSTDPB060UW444MXX",
@jaredh159
jaredh159 / address.sh
Created December 18, 2024 19:30
failing to replicate lulu address error
curl --silent -X POST \
--location 'https://api.lulu.com/print-job-cost-calculations/' \
--header 'Authorization: Bearer NOT-REAL' \
--header 'Cache-Control: no-cache' \
--header 'Content-Type: application/json' \
--data '{
"line_items": [
{
"page_count": 32,
"pod_package_id": "0600X0900BWSTDPB060UW444MXX",