Skip to content

Instantly share code, notes, and snippets.

View birkin's full-sized avatar

Birkin James Diana birkin

View GitHub Profile
@birkin
birkin / archival_a11y_reminder_to_self.md
Last active April 21, 2026 13:29
"archival" reminder

(this is an LLM summary)

To qualify as archived web content, the content must:

(1) have been created before the entity’s compliance date, or reproduce pre-deadline paper/physical media;

(2) be retained exclusively for reference, research, or recordkeeping;

(3) not be altered or updated after archiving; and

@birkin
birkin / example_all_activity_tool_usage.md
Last active April 21, 2026 11:51
example `all-activity` tool usage

BDR Recent Activity example

Example-usage of one of the newer bdr-api-tools...

This tool takes a number -- in this case 30 -- and shows that number of the most recent public items added to the BDR. It also groups them by collection. The collection data is shown first, followed by the items.


usage

@birkin
birkin / example_collection_activity_tool_usage.md
Last active April 21, 2026 11:50
example `collection-activity` tool usage

BDR Collection Activity examples

Example-usage of one of the newer bdr-api-tools...

This tool takes a collection-pid, and shows a monthly count of items-added.


Opening-the-Archives / Brazil

@birkin
birkin / sanitize_mod_sec_logs.py
Created April 20, 2026 16:30
sanitizes mod-security output for LLM analysis.
#!/usr/bin/env -S uv run
"""
Sanitizes extracted mod_security log output for safer sharing.
This script preserves the general structure and diagnostic meaning of the log
while redacting likely sensitive values such as IP addresses, hostnames, URIs,
unique request identifiers, timestamps, and absolute file paths.
Usage:
@birkin
birkin / agent_summary_doc_ideas.md
Last active April 19, 2026 01:11
agent-summary-docs chatgpt-5.4-medium thoughts

Repo Summary Doc Possibilities

(2026-apr-18-sat; chatgpt-5.4-medium; birkin; see birkin-prompt at bottom)

Purpose

The goal is not merely to document each repo for a human reader.

The goal is to let an agent answer cross-repo questions efficiently, especially questions like:

@birkin
birkin / implications_of_accept_text_markdown.md
Created March 20, 2026 23:12
implications of growing use of `accept: text/markdown`.

Implications of Accept: text/markdown for Django-delivered HTML content

Based on Cloudflare’s “Introducing Markdown for Agents” article, the practical implication for a Django developer is that your HTML pages may increasingly want a second negotiated representation aimed at AI agents and machine consumers: text/markdown.

Core takeaway

Historically, many Django apps have treated a page as either:

@birkin
birkin / code4lib_2026_highlights.md
Last active March 12, 2026 13:31
personal highlighs of the code4lib-2026 conference

code4lib-2026 highlights

Notes:

  • not all talks are listed -- this is just my highlights
  • below contains my raw quick-typed notes, with a Summary of what resonated for me

Day 1 — March 2, 2026

@birkin
birkin / manual_transform.py
Last active March 10, 2026 02:29
script that takes a path or url to a source-inscription and a stylesheet -- and applies the transform.
# /// script
# requires-python = ">=3.8, <3.9"
# dependencies = [
# "httpx~=0.28.0",
# "lxml~=6.0.2.0",
# ]
# ///
"""
@birkin
birkin / api_example_01.py
Created February 25, 2026 15:51
demo script for code4lib-2026 talk on `uv`
# /// script
# requires-python = ">=3.12, <3.13"
# dependencies = [
# "httpx==0.28.1",
# ]
# ///
import httpx
@birkin
birkin / mysql_to_tsv.sh
Last active January 26, 2026 01:44
Script to export all non-view db-tables from a MySQL database to TSV files.
#!/usr/bin/env bash
# Script to export all tables (other than "views") from a MySQL database to TSV files.
# You'll be prompted for the password for each export.
# WILL overwrite existing files in the output directory.
set -euo pipefail # ensures pipeline fails if any command in the pipeline fails
# user-configurable variables ---------------------------------------
MYSQL_BIN="/PATH/TO/mysql"