Skip to content

Instantly share code, notes, and snippets.

View lmmx's full-sized avatar
💡
lights, camera, action

Louis Maddox lmmx

💡
lights, camera, action
View GitHub Profile
@lmmx
lmmx / node_types.parquet
Last active November 3, 2025 01:47
Loaded node types into parquet via polars-genson via https://gist.github.com/lmmx/ed3dd70ea7997f27efa1ff31b625c0b1
@lmmx
lmmx / 1_node_types_schema.yaml
Last active November 3, 2025 00:33
tree-sitter-rust (v0.24.0) node types - Avro schema (https://docs.rs/tree-sitter-rust/latest/tree_sitter_rust/constant.NODE_TYPES.html), JSON schema, and some quick [not great quality] Serde structs (via https://app.quicktype.io/?l=rust)
fields:
- name: node_types
type:
items:
fields:
- name: type
type: string
- name: named
type: boolean
- name: subtypes
@lmmx
lmmx / 1_demo.rs
Last active November 2, 2025 16:05
`ropey::Rope` hello world with string diff
#!/usr/bin/env rust-script
//! ```cargo
//! [dependencies]
//! ropey = "1.6"
//! smartstring = "1.0"
//! ```
use ropey::Rope;
use smartstring::alias::String as Tendril;
@lmmx
lmmx / USAGE.sh
Last active October 31, 2025 10:47
Rust-script to parse cargo doc diagnostics as JSON in Rust
cargo doc --message-format=json 2>/dev/null | ./cdoc.rs -
@lmmx
lmmx / README.md
Last active October 30, 2025 16:23
Point viewer with JSON storage (rust-script MVP in facet, egui)

Point Dragger

A GUI application for creating, manipulating, and arranging points on a canvas. Points can be circles or squares, and supports multi-selection, cloning, and grid-based layout.

Features

  • Draw circles and squares on a canvas
  • Select single or multiple points
  • Drag points with mouse (snapped to grid)
  • Clone points in any direction
@lmmx
lmmx / cliptargets_command.sh
Created October 30, 2025 12:31
Cliptargets ANSI HTML to markdown converter one liner
function reclip { cliptargets --json | jq '.["text/html"]' | htmd - | clip ; }
@lmmx
lmmx / agile_energy_london.json
Last active October 28, 2025 18:19
🐙 Agile Energy London via Octopus Energy https://agilebuddy.uk/historic/agile
We couldn’t find that file to show.
@lmmx
lmmx / gh-issue-edit-body.sh
Last active October 27, 2025 15:51
Use `gh issue` or `gh pr` to edit a PR/issue non-interactively (jump directly to editor, no TUI)
function ghieb() {
[[ $# -eq 0 ]] && echo "Usage: ghieb <issue ID>" && return 1
local tmpfile=$(mktemp)
trap "rm -f $tmpfile" RETURN EXIT
gh issue view $1 --json body -q .body > "$tmpfile" || return 1
$EDITOR "$tmpfile"
gh issue edit $1 --body-file "$tmpfile"
}
@lmmx
lmmx / Instructions.md
Last active October 26, 2025 13:06
🎱 Magic Claude Planner (Claude Projects source files) Project instructions + 2 files. Adaptation of 🎱 Magic Claude Ball, see: https://gist.github.com/lmmx/d892562a81eca87f759fc0db58ee67c5

I don't want you to take over. I keep trying to get help planning my days and people keep taking control of my schedule from me. You are going to avoid that, or even the impression of that by following some rules of engagement in our chat. I am hypersensitive to controlling planners. I want the interface of a Magic 8 Ball, not a demanding assistant telling me to 'Tell me your goals first, and I'll build you a schedule.'

@lmmx
lmmx / 1_compressed_outline_43L.md
Created October 26, 2025 10:49
Node outlines by Claude Sonnet 4.5 of Test Doubles, ch. 13 of "Software Engineering at Google" https://abseil.io/resources/swe-book/html/ch13.html

Test Doubles Overview

  • Stand-ins for real implementations in tests (like stunt doubles)
  • Three types: fakes, stubbing, interaction testing
  • Google learned the hard way: overusing mocking frameworks creates maintenance nightmares with few bug finds
  • Practices vary widely across Google teams

Making Code Testable

  • Testability requires upfront investment (harder to retrofit later)
  • Use dependency injection to create "seams" for test doubles
  • Mocking frameworks reduce boilerplate but come with major caveats