Skip to content

Instantly share code, notes, and snippets.

@robmcmullen
robmcmullen / arch-braindump.md
Last active July 29, 2026 23:55
Arch Braindump

Basic stuff to install

pacman -Syu net-tools 

ZFS

pacman -Syu linux-headers linux zfs-meta
@robmcmullen
robmcmullen / zfs-import-key-prompt
Created July 27, 2026 04:11
OpenRC script to prompt for ZFS passwords on boot
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License v2
depend() {
before zfs-mount
after zfs-import
keyword -timeout
}
start() {
@robmcmullen
robmcmullen / Alpine-run-from-RAM.md
Last active August 2, 2026 05:29
Alpine Linux run from RAM

Run Alpine Linux from RAM as a desktop OS

The goal is to have a system on an external USB drive that loads the entire OS to RAM and runs from there. The OS will include a full a graphical desktop (XFCE in this example). Home directories and other persistent storage will be on filesystems on internal laptop block devices.

Caution

Rule #1: Any changes to the OS or packages added by apk add must be followed by lbu commit -d to save the changes to the OS partition. You will lose work by forgetting to call lbu commit -d. See below for examples.

Create Boot Disk

#!/usr/bin/env python
# jsonpickle doesn't handle the case of an object being serialized without
# __getstate__ to then be restored with __setstate__. __setstate__ is never
# called because the json data does not have the "py/state" key. Only by adding
# a custom handler can we support both formats to go through __setstate__
import jsonpickle
class Original(object):
# Log level manager and log viewer for wxPython
#
# Provides capture window to show logging messages and list of all loggers
# known to python logging module. Loggers may be turned on and off using simple
# pattern matching or the graphical list of loggers.
#
# Remembers the initial log level of each logger and sets the log level to
# DEBUG when turning on a logger, returning the log level to the initial log
# level when turning off.
#
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="""
I never freaking remember argparse syntax and the docs are so all over the place
that I need this for an example.
@robmcmullen
robmcmullen / example_task_app.py
Created February 7, 2014 20:24
Small example tasks application to manage multiple windows
"""Simple self-contained tasks application
Use Window -> New Window to create new windows. Without a default layout,
File -> Exit will cause the following exception if there are multilpe
windows open:
Traceback (most recent call last):
File "/data/home/rob/src/enthought/pyface/pyface/ui/wx/action/action_item.py", line 260, in _on_menu
self.controller.perform(action, action_event)
File "/data/home/rob/src/enthought/pyface/pyface/tasks/action/task_action_controller.py", line 31, in perform