Skip to content

Instantly share code, notes, and snippets.

View mrexodia's full-sized avatar
🍍

Duncan Ogilvie mrexodia

🍍
View GitHub Profile
@mrexodia
mrexodia / index.html
Created April 24, 2026 01:57
Invitation taste walkthrough for Monika and Duncan
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invitation Taste Walkthrough</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
@mrexodia
mrexodia / AGENT-env.md
Last active April 14, 2026 08:37
Claude Deep Research about standardized `AGENT` environment variable

The race to standardize how coding agents announce themselves

There is no established standard yet, but a clear frontrunner has emerged. The most significant proposal is Issue #136 on the agentsmd/agents.md repository (18k+ stars), filed January 8, 2026, which proposes a universal AGENT=<name> environment variable — directly modeled on the CI=true convention that unified CI/CD detection years ago. Three coding agents already ship with this convention (Goose, Amp, Bun), two detection libraries exist to paper over the fragmentation (@vercel/detect-agent and unjs/std-env), and a parallel naming camp champions AI_AGENT=<name> instead. The ecosystem is in the "organic adoption" phase, with real-world friction driving urgency.

The central proposal mirrors how CI=true became universal

The AGENTS.md repository — already the de facto standard for giving coding agents project-specific instructions — hosts the most authoritative proposal for e

"""Minimal MCP server with pi-like tools for workshops.
This version is intentionally small and easy to read.
It is not a full behavioral match for pi's native tools.
Each tool includes comments describing what a production version would need.
"""
import argparse
import datetime
import os
"""Example MCP server with pi-like tools."""
import argparse
import datetime
import os
import re
import subprocess
import tempfile
from dataclasses import dataclass
from typing import Annotated, Literal, Optional
@mrexodia
mrexodia / fetch_pipeline.py
Created February 23, 2026 18:27
Gitlab Pipeline Utilities
#!/usr/bin/env python3
"""
Fetch CI pipeline job logs and artifacts locally.
Usage:
# Default: latest pipeline for current branch
# Logs for all jobs, artifacts for failed jobs only
python3 tools/ci/fetch_pipeline.py
# Specific pipeline
@mrexodia
mrexodia / answer.md
Created November 23, 2025 12:55
When a breakpoint is triggered, how should I use a script function to print each member of a std::vector pointed to by the `rcx` register?

DeepWiki Q&A with Code Context for Repository: x64dbg/x64dbg

Q1

When a breakpoint is triggered, how should I use a script function to print each member of a std::vector pointed to by the rcx register?

Answer

To print each member of a std::vector pointed to by the rcx register when a breakpoint is triggered, you need to understand the memory layout of std::vector and use x64dbg's scripting capabilities with breakpoint commands.

Solution Approach

1. Set up a breakpoint command

@mrexodia
mrexodia / elf_mapper.py
Created June 13, 2025 15:39
Dumb ELF mapper POC
import logging
from dataclasses import dataclass
from typing import Optional
from enum import Enum
from elftools.elf.elffile import ELFFile
from elftools.elf.relocation import RelocationSection
from elftools.elf.sections import SymbolTableSection
logging.basicConfig(level=logging.DEBUG)
@mrexodia
mrexodia / zlib-utils.cpp
Created May 29, 2025 09:06
Simple ZLIB utility functions.
#include <vector>
// https://github.com/richgel999/miniz (MIT)
#include <miniz.h>
static std::vector<uint8_t> zlib_compress(const void *data, size_t size) {
uLongf compressed_size = compressBound(size);
std::vector<uint8_t> compressed(compressed_size);
int res = compress(compressed.data(), &compressed_size, (const unsigned char *)data, size);
@mrexodia
mrexodia / litellm_lm_studio_generate.py
Created April 18, 2025 21:50
Automatically generate LiteLLM config for all models in LM Studio
import argparse
import json
import urllib.request
import urllib.error
import sys
import yaml
def generate(prefix, model_id, endpoint, api_key):
return {
"model_name": f"{prefix}/{model_id}",
@mrexodia
mrexodia / tornado-thread.py
Created January 21, 2025 16:29
Tornado graceful shutdown from a thread
import threading
import tornado.ioloop
import tornado.web
import time
import asyncio
import logging
import requests
g_ioloop = None
g_server = None