Skip to content

Instantly share code, notes, and snippets.

View ocodo's full-sized avatar

ocodo ocodo

View GitHub Profile
@ocodo
ocodo / SKILL.md
Last active November 11, 2026 03:33
ChatGPT skill for collaborative scripting

Precise Shell Workflow

Core principle

Do the work, don't delegate avoidable manual work to the user, do not dawdle, get the program written do not dither and pause, and procrastinate, get shit done, fix errors. done.

Make the smallest change that accomplishes the requested task. Preserve working code and existing conventions.

This text is targeted for users of Wayland on Arch. (use paru for package management. uv is used for python script run, tools etc. wl-copy and wl-paste for clipboard use etc.)

Waydroid networking troubleshooting summary

Goal

Get Waydroid connected to the internet and, preferably, the local LAN. The host LAN is 10.0.0.0/24, with gateway 10.0.0.1 and intended DNS resolver 10.0.0.2.

The approach is to retain Waydroid's existing waydroid0 bridge and provide correct forwarding and NAT. We have not migrated Waydroid onto the physical LAN subnet.

Host network

@ocodo
ocodo / mine-audit.py
Created October 12, 2026 01:25
Run from Live USB Audit a Linux Mint for migration to Cachy-OS without reinstall (WIP) uv run mine-audit.py <audit dit> <mint src root> [output dir]
#!/usr/bin/env python3
"""mine-audit.py AUDIT_DIR MINT_ROOT [OUTPUT_DIR]
Read-only Mint -> CachyOS audit miner.
Requires: uv, Python 3, ripgrep (rg), dpkg-query from the host.
Does not execute commands inside the mounted source root.
"""
import json
import re
@ocodo
ocodo / niri-bind-list
Last active September 1, 2026 02:23
Niri DMS binding list cli tool (requires, niri, dms-shell and uv)
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "kdl-py",
# ]
# ///
from pathlib import Path
import kdl
@ocodo
ocodo / flicker.html
Last active August 27, 2026 16:20
The Flicker 1966 as an interactive html page (stroboscope - epilepsy warning) Control Strobe Hz with the mouse wheel (10hz default, start stop with Space / Mouse Click)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Flicker — Local Stimulus</title>
<style>
html,
body {
margin: 0;
# Large type for a 4k TV
xterm*background: #121619
xterm*foreground: white
xterm.*backarrowKey: false
XTerm*ttyModes: erase ^?
XTerm*VT100.Translations: \
#override <Key>BackSpace: string(0x7f) \n\
@ocodo
ocodo / inoffensive_slur_engine.sh
Created July 17, 2026 08:38
Detects that you aren't using fd and calls you something insulting but not offensive... add this to your internal tools, or not idgaf
#!/bin/bash
technically_not_a_slur() {
local insults=(
"absolute MELONHEAD"
"a SENTIENT CABBAGE"
"MOONFACE with empty space between ears"
"TURNIP with a pulse"
"PUMPKIN-headed waste of seeds"
"SAUSAGE BRAINED WATERHEAD"
@ocodo
ocodo / brnm.sh
Created June 27, 2026 15:59
Bulk rename from shell using wdired in emacs. (the best bulk rename tool)
# brnm from shell on a folder.
brnm() {
local dir="${1:-.}"
# Check if we can write to the directory
if [[ -w "$dir" ]]; then
emacsclient --tty --eval "(dired-rename-from-shell \"$dir\")"
else
echo "Directory not writable, using sudo..."
emacsclient \
--tty \
@ocodo
ocodo / keyd config.md
Last active June 23, 2026 12:25
Keyd - /etc/keyd/default.conf - super tap as super space, and shift esc as ~ (for 60% layout)
@ocodo
ocodo / passmenu.sh
Created March 21, 2026 12:24
Passmenu in fuzzel
#!/bin/bash
export PASSWORD_STORE_CLIP_TIME=10
shopt -s nullglob globstar
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )