Skip to content

Instantly share code, notes, and snippets.

View wrouesnel's full-sized avatar

Will Rouesnel wrouesnel

View GitHub Profile
@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
@wrouesnel
wrouesnel / gist:b9e7403eeb4f112f11d8f91e4a647903
Created April 17, 2025 11:26
Open a sqlitedb using the pure Golang modernc recompilation in readonly mode
db, err := sqlx.Open("sqlite", fmt.Sprintf("file:%s?mode=ro", tempDb.Name()))
if err != nil {
return errors.Join(&ErrCommand{}, err)
}
@wrouesnel
wrouesnel / launch-instance
Created March 21, 2025 15:19
Wrapper script for launching an "on-demand" ephemeral EC2 instance
#!/usr/bin/env python3
# Wrapper script to launch an ephemeral EC2 instance
import os
import time
import sys
import argparse
import boto3
import logging
import socket