Skip to content

Instantly share code, notes, and snippets.

View srcreigh's full-sized avatar

Shane Creighton-Young srcreigh

View GitHub Profile
import json
import traceback
from mitmproxy import ctx, http
def response(flow: http.HTTPFlow) -> None:
assert flow.response is not None
assert flow.response.content is not None
if (flow.request.method, flow.request.host) != ("POST", "gql-fed.reddit.com"):
return
@srcreigh
srcreigh / m3-arm-k3s-cilium-kata-qemu-guide.md
Created October 22, 2025 22:00
M3 MacBook Pro - Ubuntu VM running k3s/cilium/kata-qemu

Install tart to get a ubuntu VM with nested vert.

brew install cirruslabs/cli/tart
tart clone ghcr.io/cirruslabs/ubuntu:latest ubuntu
tart run ubuntu --nested

SSH in

@srcreigh
srcreigh / diagnostics.zig
Last active February 18, 2026 18:43
Zig union(enum)-based diagnostics
// =============================================================================
// diagnostics.zig: Generic union(enum) Diagnostics error
// payloads library
//
// MIT LICENSE (C) 2026 Shane Creighton-Young
//
// Project Link: https://gist.github.com/srcreigh/1d05f1e74150e9c50938c1b6e7bcdff6
//
// HOW TO USE
// - Read the article https://srcreigh.ca/posts/error-payloads-in-zig/