Skip to content

Instantly share code, notes, and snippets.

View sulrich's full-sized avatar
🙀
furble plotz

steve ulrich sulrich

🙀
furble plotz
View GitHub Profile
#!/usr/bin/env perl
# place the individual files from my mail archives into a directory
# hierarchy of the form appropriate
#
# pooka [sulrich/tmp-mailfoo]% ./archive-maildir.pl \
# --arch_dir=/Users/sulrich/tmp-archive-foo/cisco \
# --src_dir=/Users/sulrich/tmp-mailfoo volunteer
# --keep_recent
# archive_dir/$mbox_dir-YYYY-MM/cur/message_file
@sulrich
sulrich / snarf-running.py
Last active July 13, 2026 20:29
extracts the running configuration from `show tech` in EOS
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# ///
import argparse
import re
import sys
#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.argument1 { "type": "text", "placeholder": "emoji" }
# @raycast.argument2 { "type": "text", "placeholder": "status" }
# @raycast.mode fullOutput
# @raycast.title omg lol status
# @raycast.icon 😍
# @raycast.packageName omg-lol-status
name: POSSE
on:
push:
branches: [main]
paths:
- "content/posts/**"
- "content/til/**"
- "content/links/**"
- "bin/posse.py"
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "atproto",
# "grapheme",
# "Mastodon.py",
# "python-frontmatter",
# "requests",
# ]
@sulrich
sulrich / compare-paths.py
Created July 28, 2025 17:50
compare-paths.py
#!/usr/bin/env python3
# given the following items:
# - a master list of openconfig paths (--master-list)
# - a list of paths which will be compared against the master list (--target-list)
#
# output the following:
# - a list of paths which are requested in the target-list but are
# not supported in the master path list (missing paths)
# - a list of paths which exist in both lists (supported paths)
@sulrich
sulrich / gemini-cli-sandbox
Last active July 3, 2025 16:07
gemini-cli Dockerfile
# is there a lighter container that fits the bill here?
FROM node:20
RUN useradd -m gemini
RUN apt-get update && \
apt-get install -y nodejs npm && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g @google/gemini-cli
@sulrich
sulrich / claude-code-sandbox
Last active July 3, 2025 16:03
put claude code in a sandbox
# is there a lighter container that fits the bill here?
FROM python:3.11-slim
RUN useradd -m claude
RUN apt-get update && \
apt-get install -y nodejs npm && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g @anthropic-ai/claude-code
@sulrich
sulrich / homebrew.mxcl.ollama.plist
Created March 14, 2025 03:23
ollama service plist with environment update to allow remote connections
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.ollama</string>
<key>LimitLoadToSessionType</key>
<array>
@sulrich
sulrich / parse-gobmp-dump.py
Created July 10, 2024 19:18
script to parse GoBMP dump outputs
#!/usr/bin/env python3
import json
import base64
import argparse
import pprint as pprint
import sys
def parse_logentry(entry):