Skip to content

Instantly share code, notes, and snippets.

View wrouesnel's full-sized avatar

Will Rouesnel wrouesnel

View GitHub Profile
@wrouesnel
wrouesnel / README.md
Last active November 4, 2026 21:09
Update an OpenZFS PR head without rerunning its QEMU tests: fork CI gate, upstream reuse prediction, guarded push

Update an OpenZFS PR without rerunning its QEMU tests

OpenZFS CI (.github/workflows/scripts/reuse-ci.py, since #19394 and #19431) reuses the results of push runs in the PR's head repository for the exact PR head SHA, from the last 7 days, on the first attempt of the PR run. It covers zfs-qemu, zloop, unit-tests, zfs-arm and checkstyle. So:

  1. Push the change to a separate branch on your fork, and let fork CI run.
- name: ensure multi-homed arp handling is correct
sysctl:
name: "{{item.name}}"
value: "{{item.value}}"
sysctl_set: true
loop:
- name: net.ipv4.conf.all.arp_ignore
value: 1
- name: net.ipv4.conf.all.arp_announce
value: 2
@wrouesnel
wrouesnel / typeable.sh
Last active February 23, 2026 23:16
Fold Text into convenient typeable bblocks
fold -w4 | tr '\n' ' ' | fold -s -w 72 | cat -n ; echo
- name: Configure pam_group
lineinfile:
path: /etc/security/group.conf
line: "*;*;%domain users;Al0000-2400;render,audio,video,dialout,colord"
@wrouesnel
wrouesnel / git-clone
Created October 12, 2025 22:48
Clone git repositories to a default sensible structure in your homedirectory
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "furl",
# ]
# ///
"""Clone git repos to the default directory structure"""
@wrouesnel
wrouesnel / worklog.py
Last active September 8, 2025 00:33
Very simple worklog script for CLI usage
#!/usr/bin/env python3
import sys
import datetime
import click
import appdirs
import io
import subprocess
from pathlib import Path
#!/bin/bash
#
# DANGEROUS!
#
# aws-route53-wipe-hosted-zone - Delete a Route 53 hosted zone with all contents
#
set -e
VERBOSE=true
delete_record() {
@wrouesnel
wrouesnel / gh-clone
Last active September 8, 2025 01:45
Opinionated Python script for cloning Github repositories
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "furl",
# ]
# ///
"""Clone git repos to the default directory structure"""
nix run --impure --expr '(builtins.getFlake "github:nixos/nixpkgs/nixpkgs-unstable").legacyPackages."${builtins.currentSystem}".nnn.override {withNerdIcons = true;}'
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "PyGitHub",
# "GitPython"
# ]
# ///
import argparse
import subprocess