Skip to content

Instantly share code, notes, and snippets.

View cameronapak's full-sized avatar
:electron:
Jesus Saves

Cameron Pak cameronapak

:electron:
Jesus Saves
View GitHub Profile
@cameronapak
cameronapak / basecoatui-postprocessed.css
Created June 4, 2025 01:29
Basecoat UI Post-processed CSS File
/*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Geist+Mono&display=swap");
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
:root, :host {
--font-sans: 'Geist';
--font-mono: 'Geist Mono';
--color-amber-50: oklch(98.7% 0.022 95.277);
@cameronapak
cameronapak / bknd.config.ts
Created July 15, 2025 13:48
My guess at s3 bucket adapter for bknd
import type { AstroBkndConfig } from "bknd/adapter/astro";
import type { APIContext } from "astro";
import { em, entity, number, text, libsql } from "bknd/data";
import { secureRandomString } from "bknd/utils";
import { StorageS3Adapter, MediaAdapterRegistry, type S3AdapterConfig } from "bknd/media";
import { syncTypes } from "bknd/plugins";
import { registries } from "bknd";
import {
LIBSQL_DATABASE_TOKEN,
LIBSQL_DATABASE_URL,
@cameronapak
cameronapak / bknd-astro-integration-registry.json
Last active July 24, 2025 14:13
Add bknd to Astro with a simple shadcn registry
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "astro-integration",
"type": "registry:block",
"title": "bknd Astro Integration",
"description": "Integration files for using bknd with Astro",
"dependencies": [
"bknd@latest",
"astro"
],
@cameronapak
cameronapak / prompt-convert-bible-reference-to-usfm.md
Created August 15, 2025 16:27
LLM prompt to help you convert Bible references into USFM format.

Role and Purpose:

You are an expert Bible reference converter, tasked with transforming a given Bible verse reference into the USFM (Unified Standard Format Markers) short code format used in digital Bible texts. This conversion is critical for accurate Bible software indexing and referencing.

Context and Background:

You will receive references like "John 3:16" or "Psalms 23:1-3" and must output the corresponding USFM short code format, such as "JHN.3.16" or "PSA.23.1-3". The USFM codes are standardized abbreviations for each Bible book, and some books have multiple forms (e.g., "Psalm" vs. "Psalms") that should be normalized to the correct USFM code.

Examples:

Input Expected Output Explanation
@cameronapak
cameronapak / backup-restore-do.md
Created July 11, 2026 23:47
Dotflowy: backup & restore story for per-user Durable Objects (wayfinder #155)

Backup & restore for per-user Durable Objects — research summary

Wayfinder ticket #155, map #151 (alpha → beta).

Question: disaster-recovery story for outlines living in per-user DO SQLite, and the smallest thing worth building for beta.

TL;DR

  • The durability floor is already excellent and free. Every SQLite-backed DO has automatic 30-day Point-in-Time Recovery — on by default, covers all SQL rows + KV, whole-DB rollback per object. Since DO = user, per-DO recovery is per-user recovery. No infrastructure to build to have it.
  • The only gap for beta is usability: there's no button to invoke a restore. The smallest worthwhile build is an admin-gated "restore one user" tool that drives PITR for a single DO. ~a day of work; turns "theoretically recoverable" into "the operator can actually recover a user."