Skip to content

Instantly share code, notes, and snippets.

View nickludlam's full-sized avatar
💭
Knee deep in PydanticAI graphs

Nick Ludlam nickludlam

💭
Knee deep in PydanticAI graphs
View GitHub Profile
@nickludlam
nickludlam / index.html
Created August 24, 2026 14:29
wardogs crash analyser - mostly written by Kimi k3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wardogs Crash Dump Analyzer</title>
<style>
:root {
--bg: #0d1117; --panel: #161b22; --border: #2b333d;
--text: #d7dde4; --dim: #8b95a1; --mono: "Cascadia Code", Consolas, "Courier New", monospace;
use fxhash::FxHashMap; // Zed uses FxHash for maximum performance
const WINDOW_SIZE: usize = 1024;
const ALARM_THRESHOLD: u32 = 110_000;
pub struct LoopDetector {
ring_buffer: [char; WINDOW_SIZE],
head: usize,
counts: FxHashMap<char, u32>,
dirty_sum_of_squares: u32,
@nickludlam
nickludlam / git_log_intelligence.py
Created April 8, 2026 15:34
The python script workhorse for my "git log intelligence" skill
import subprocess
import json
import re
import os
import argparse
from datetime import datetime, timedelta
CONFIG_PATH = ".config/git_filters.json"
MAX_MSG_LEN = 1000 # Character limit per commit for the LLM context
MAX_LINES = 200 # Max number of commits to include in summary (after filtering)
@nickludlam
nickludlam / SKILL.md
Created April 8, 2026 15:34
Part of my "git log intelligence" skill
name git-log-intelligence
description High-efficiency tool to fetch, filter, and summarize GitHub repository changes without cloning. It uses a persistent JSON configuration to "remember" which types of commits (e.g., docs, bots, chores) should be ignored.

Directory Structure

  • git_log_intelligence.py: The primary script containing execution logic.
  • .config/git_filters.json: The persistent memory of ignore patterns.
@nickludlam
nickludlam / Dockerfile
Last active March 28, 2026 17:47
Docker patches to allow me to build an OpenClaw gateway image with specific binaries
# syntax=docker/dockerfile:1.7
# Opt-in extension dependencies at build time (space-separated directory names).
# Example: docker build --build-arg OPENCLAW_EXTENSIONS="diagnostics-otel matrix" .
#
# Multi-stage build produces a minimal runtime image without build tools,
# source code, or Bun. Works with Docker, Buildx, and Podman.
# The ext-deps stage extracts only the package.json files we need from
# extensions/, so the main build layer is not invalidated by unrelated
# extension source changes.
@nickludlam
nickludlam / gulpfile.mjs
Created March 18, 2026 12:41
A gulpfile which gives live reload functionality while developing a ghost theme hosted inside a docker container
import fs from 'fs';
import { series, watch, src, dest, parallel } from 'gulp';
import pump from 'pump';
import path from 'path';
import merge from 'merge-stream';
// gulp plugins and utils
import livereload from 'gulp-livereload';
import postcss from 'gulp-postcss';
import zip from 'gulp-zip';
@nickludlam
nickludlam / start_dev_client.bat
Created March 11, 2026 21:44
Start a dev client to connect to a local server for mod testing
@echo off
:: 1. Path to the game (NOT the server)
set "GAME_ROOT=E:\SteamLibrary\steamapps\common\Arma Reforger"
set "GAME_EXE=%GAME_ROOT%\ArmaReforgerSteam.exe"
set "GAME_DATA=%GAME_ROOT%\addons"
:: 1. Path to the game Executable
set "SERVER_DIR=E:\SteamLibrary\steamapps\common\Arma Reforger Server\arma_reforger"
set "SERVER_EXE=%SERVER_DIR%\ArmaReforgerServerDiag.exe"
@nickludlam
nickludlam / start_dev_server.bat
Created March 11, 2026 21:43
Start a dev server on Windows for local mod testing
@echo off
:: 1. Path to the game Executable
set "SERVER_DIR=E:\SteamLibrary\steamapps\common\Arma Reforger Server\"
set "SERVER_EXE=%SERVER_DIR%\ArmaReforgerServer.exe"
:: 2. Path to the Game Data (The core game folder)
set "GAME_ROOT=E:\SteamLibrary\steamapps\common\Arma Reforger"
set "GAME_DATA=%GAME_ROOT%\addons"
@nickludlam
nickludlam / gist:919bdf0d5274ffbe65af5cb5f26d133f
Created March 6, 2026 14:16
LLM written Agents.md for Svelte 5
# Code Assistant Directives for Svelte 5 Runes
This document directs code assistants to write code using **Svelte 5 Runes**, the new reactivity model in Svelte 5.
## Overview
Svelte Runes are a set of powerful APIs that provide fine-grained reactivity in Svelte 5. When writing or modifying code in this project, always use runes instead of the legacy reactive declarations and statements.
## Core Runes
@nickludlam
nickludlam / gist:44c80462c773465d34251b7b12f4724d
Created April 27, 2025 20:20
Arma Reforger Server Config - Local Testing (remove 'local' to bind to a public IP)
{
"bindAddress": "0.0.0.0",
"bindPort": 2001,
"publicAddress": "local",
"publicPort": 2001,
"a2s": {
"address": "0.0.0.0",
"port": 17777
},
"game": {