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 / clone_gh_labels.sh
Last active November 7, 2025 17:16
Clone facet-rs/facet issue labels to another facet repo (modified version of https://gist.github.com/lmmx/094c0a0061da3bbc9a333fe95c3dee53/)
# Delete all the unwanted defaults
gh label delete bug --yes
gh label delete documentation --yes
gh label delete duplicate --yes
gh label delete enhancement --yes
gh label delete "good first issue" --yes
gh label delete "help wanted" --yes
gh label delete invalid --yes
gh label delete question --yes
gh label delete wontfix --yes
@lmmx
lmmx / const_str_field.rs
Last active November 7, 2025 13:08
Constant static str de/ser in facet-json
#!/usr/bin/env rust-script
//! ```cargo
//! [dependencies]
//! facet = "0.30"
//! facet-json = "0.30"
//! ```
use facet::Facet;
use facet_json;
@lmmx
lmmx / gist:3f2a40cfeb8eadddeaff37e727e3394f
Last active November 4, 2025 20:52
Quick list out of Python / Rust (PyO3) packages as GitHub repo links, reverse chronological
@lmmx
lmmx / node_types.parquet
Last active November 6, 2025 00:57
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.