Skip to content

Instantly share code, notes, and snippets.

View waynegraham's full-sized avatar

Wayne Graham waynegraham

View GitHub Profile
@waynegraham
waynegraham / review.md
Last active September 27, 2026 14:50
2023 Reivew

2023 CMS presence review

Derived from /tmp/iab-23-work-presence.json. These are review candidates, not an approved import list. Code absence cannot exclude an existing work whose code was edited. Title differences do not prove absence.

54 source rows whose preferred IAB codes are absent

Airtable record ID IAB code Title
rec7wAs0qg8xKY4ZL 23-OA4-02-001 Adam, Eve, Others, and a Meteorite
recRIM1erXo9j57QO 23-OB4-02-006 anywhere can be a place of worship
@waynegraham
waynegraham / worker.js
Created August 30, 2026 18:55
Cloudflare image worker
const OCI_REGION = "me-riyadh-1";
const OCI_NAMESPACE = "YOUR_NAMESPACE";
const OCI_BUCKET = "YOUR_BUCKET";
export default {
async fetch(request) {
const url = new URL(request.url);
if (request.method !== "GET" && request.method !== "HEAD") {
return new Response("Method not allowed", {
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DSC00047 — Diplomatic transcription</title>
<style>
:root {
color-scheme: light;
--paper: #f6f1e6;
@waynegraham
waynegraham / celebi-map.json
Last active June 1, 2026 12:13
Çelebi Map
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://localhost/manifest/evliya-celebi-nile-scroll.json",
"type": "Manifest",
"label": {
"en": [ "Evliya Çelebi's Nile Map (Stitched Scroll View) - Vat.turc.73" ]
},
"description": {
"en": [ "A single-canvas compilation of the 7 primary vertical segments of the Nile Scroll manuscript for unified georeferencing." ]
},
@waynegraham
waynegraham / 01_README.md
Last active April 27, 2026 15:10
Postgresql Vector Search example

This gist has SQL scripts to pull data into PostgreSQL and perform a demo "similarity" search.

Create database

CREATE TABLE iab_assets (
    id SERIAL PRIMARY KEY,
    iab_code TEXT,
    title TEXT,
    origin TEXT,
@waynegraham
waynegraham / chart.md
Last active January 26, 2026 19:10
Mermaid chart

Infrastructure

flowchart TB

%% User Experience Layer
UX["User Experience Layer<br/>• Public Web Experience<br/>• Research Interfaces<br/>• Admin Interfaces<br/><i>(Biennale Artistic & Curatorial Identity)</i>"]

%% Search & Access
#!/usr/bin/env python3
import os
import subprocess
from pathlib import Path
from concurrent.futures import ProcessPoolExecutor, as_completed
import multiprocessing
# Input and output directories
INPUT_DIR = "data" # change to your directory of PDFs
OUTPUT_DIR = "ocr_output"
@waynegraham
waynegraham / mailer.php
Created October 30, 2024 16:09
PHP Mailer Test
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require './vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/');
$dotenv->load();
@waynegraham
waynegraham / update.sh
Last active January 30, 2024 18:11
Update StopForumSpam Blocked IPs
#!/bin/bash
#
# Pull updated IPs from StopForumSpam from
# https://www.stopforumspam.com/downloads. Note that different files have
# different download limits. Generally you can download the last day hourly and
# everything else you are limited to twice daily.
#
# URL: https://github.com/waynegraham/UpdateBlockedIPs
# Author: Wayne Graham
# License: MIT
@waynegraham
waynegraham / _footer.scss
Created September 5, 2023 17:51
CLIR footer in Bootstrap