Skip to content

Instantly share code, notes, and snippets.

View faun's full-sized avatar
🌵

Faun faun

🌵
View GitHub Profile
@faun
faun / humming-painting-raven.md
Created April 6, 2026 19:35
Alert 4421 - Datastore Infrastructure Analysis (SEV-2)

Alert 4421 - Datastore Infrastructure Analysis

Context

SEV-2 incident (#alert-4421-system_instability_unclear_why) declared at 12:17 PM PDT on 2026-04-06. System instability with unclear root cause. Impact window roughly 11:35 AM - 12:12 PM PDT (3:03 PM - 3:12 PM ET). ~40-50 users per 20-min window affected across payroll workflows (hours entry, pay dashboard, off-cycle payrolls, support pages).

Application-level findings from the channel:

  • KeyError: Enum PayrollBlockers::Enums::PayrollBlockerType key not found: :partner_tos_not_accepted (revert PR #329058)
  • http2 connection errors under load (HTTP fetch failed from 'zenpayroll')
  • Compute/network team confirmed pods healthy, scaling normal, SLO recovered
@faun
faun / llm-wiki.md
Created April 5, 2026 05:01 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@faun
faun / SSH_MACOS_SECURE_ENCLAVES.md
Created November 23, 2025 18:10 — forked from arianvp/SSH_MACOS_SECURE_ENCLAVES.md
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@faun
faun / pg_show_grants.sql
Created July 16, 2025 19:02 — forked from winebarrel/pg_show_grants.sql
show grants for PostgreSQL
select
pg_user.usename,
t1.nspname,
t1.relname,
relacl.privilege_type,
relacl.is_grantable
from (
select
pg_namespace.nspname,
pg_class.relname,
@faun
faun / COMMIT_EDITMSG
Created April 16, 2025 22:53 — forked from lencioni/COMMIT_EDITMSG
Tim Pope's model commit message
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
@faun
faun / Mermaid_on_Github_Examples.md
Created December 31, 2024 23:45 — forked from ChristopherA/Mermaid_on_Github_Examples.md
Mermaid on Github Examples

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B-->C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.
@faun
faun / character_set_and_collation.rb
Created October 21, 2024 17:30 — forked from tjh/character_set_and_collation.rb
Convert all Rails table column collation and character set
#!/usr/bin/env ruby
# Put this file in the root of your Rails project,
# then run it to output the SQL needed to change all
# your tables and columns to the same character set
# and collation.
#
# > ruby character_set_and_collation.rb
DATABASE = ''
@faun
faun / controller-gen.txt
Created March 31, 2022 22:53 — forked from jenting/controller-gen.txt
controller gen help
CRD
+groupName package
=<string> specifies the API group name for this package.
+kubebuilder:deprecatedversion type
marks this version as deprecated.
[warning=<string>]
@faun
faun / README.md
Created December 1, 2021 21:59 — forked from jonico/README.md
How to create an RDS database that is suitable for PlanetScale's import feature

MySQL on RDS configured for import to PlanetScale example

This folder contains an example Terraform configuration that deploys a MySQL database - using RDS in an Amazon Web Services (AWS) account - that is properly configured for PlanetScale's DB import feature.

It will make sure that the RDS database has the binlog exposed, gtid-mode set to ON and is using ROW-based replication. All these are pre-requisites for imports to work without zero downtime.

If you are going to write a lot of data in your database in a very short amount of time, don't forget the only manual step after the Terraform setup.