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 / sync_fork.sh
Created April 25, 2025 12:54
Sync your remote git repo with its upstream (default branch), so you can then pull the changes to your local repo
function sync-fork() {
local origin_url=$(git config --get remote.origin.url)
local fork_repo=""
if [[ $origin_url =~ github\.com[:/]([^/]+/[^/.]+) ]]; then
fork_repo="${BASH_REMATCH[1]}"
else
echo "Error: Could not parse origin remote URL"
return 1
fi
local upstream_url=$(git config --get remote.upstream.url)
@lmmx
lmmx / script.sh
Last active March 24, 2025 15:34
All the things I needed to install to run the Dioxus 0.6 demo tutorial (line 1 via https://github.com/DioxusLabs/dioxus/blob/9e09bcf3f79aa7b349da23ca80cb2a214230562b/notes/CONTRIBUTING.md?plain=1#L6)
sudo apt install libgdk3.0-cil libatk1.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev libxdo-dev -y
@lmmx
lmmx / gifopt.sh
Created March 23, 2025 13:48
Gif optimisation using gifski, a fast Rust GIF encoder https://github.com/ImageOptim/gifski/
gifopt() {
local inputgif="${1:?Missing input GIF filename}"
local quality="${2:-80}"
if ! [[ "$quality" =~ ^[0-9]+$ ]] || [ "$quality" -lt 1 ] || [ "$quality" -gt 100 ]; then
echo "Quality parameter must be an integer from 1 to 100" >&2
return 1
fi
local tmpdir="$(mktemp -d)"
@lmmx
lmmx / Cargo.toml
Last active March 21, 2025 16:52
A minimal Rust + WASM demo simulating 2,000 vehicles (buses/trains) moving on a canvas, using a shared `RefCell` for state https://qrx.spin.systems/transport-network-sim/
[package]
name = "trunk-hello-world"
version = "0.1.0"
edition = "2024"
[lib]
crate-type = ["cdylib"]
path = "lib.rs"
[dependencies]
@lmmx
lmmx / Cargo.lock
Last active March 25, 2025 14:21
A simple Rust & WebAssembly example that uses a thread-local RefCell to manage shared state, updated via an HTML slider.
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "bumpalo"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
@lmmx
lmmx / one_liner.sh
Last active March 24, 2025 22:08
Merge all dependency bot PRs (e.g. pre-commit)
PR_CMDS=$(gh search prs --limit 100 --owner $(gh api user -q '.login') --author pre-commit-ci[bot] --state open --json repository,number | jq -r '.[] | "gh pr merge \(.number) -R \(.repository.nameWithOwner) -s -d"' | awk '{printf "%s%s", (NR==1 ? "" : " && \n"), $0} END{print ""}'); echo "$PR_CMDS"; eval "$PR_CMDS"
@lmmx
lmmx / .gitignore
Last active March 18, 2025 00:38
FlatZinc-JSON format (JSONSchema) converted to Pydantic models https://www.minizinc.org/schemas/fznjson/
pyproject.toml
uv.lock

Below is a chronological “blow by blow” summary of the discussion. Each heading corresponds to a comment or set of closely related comments on a given date. I’ve highlighted who spoke, when, and the main takeaways.


December 6, 2024

Comment by @jspahrsummers (Original Post)

  • Context: MCP (Model Context Protocol) is currently stateful (long-lived connections). This enables notifications, server-initiated sampling, logging, etc., but makes serverless deployments tricky. Many serverless platforms don’t allow or prefer long-lived connections.
  • Problem: “Autoscaling, ephemeral” serverless environments have short request lifetimes and can’t easily handle SSE or a single persistent connection.
  • Possible solutions:
@lmmx
lmmx / gist:138c4ef82e87ffe7d13da04dcf78bf6e
Created March 11, 2025 22:08
Prompt for LLMs to write plans for LLMs
neutral 3rd person active voice imperatives, no pronouns or inventing a nounal developer
@lmmx
lmmx / 1_re-planned.md
Created March 10, 2025 13:03
'Architecting the architect' (using Claude Sonnet 3.7 to evaluate plans from o1 and o1 pro => re-plan). o1 = plans 1 and 3; o1 pro = plans 2 and 4. 1 and 2 are initial plans, 3 and 4 are re-plans.

OK I got 2 more plans, can you give comparisons of the two plans now?

Plan 3

Below is a merged plan (“Plan 3”) that combines the best aspects of both plans you showed, tailored to your stated preferences. I’ve reviewed the answers you gave to the design questions and aligned the final recommendations accordingly.


Plan 3: Unified & Flexible Schedule Extraction