Skip to content

Instantly share code, notes, and snippets.

View sjmf's full-sized avatar
🐝

Samantha Finnigan sjmf

🐝
View GitHub Profile
@sjmf
sjmf / probe_qt_camera_enumeration.py
Created April 23, 2026 14:50
Probe Qt5 QCamera enumeration. Standalone hardware-verification script.
#!/usr/bin/env python
"""
Probe Qt5 QCamera enumeration. Standalone hardware-verification script: prints
every attached camera and its supported viewfinder settings, so changes to Qt
or the operating-system camera stack can be smoke-tested against real devices.
Mirrors what kvm_serial/backend/video.py:enumerate_cameras() does at runtime,
but with verbose per-device output and timing so behaviour can be inspected
without launching the GUI.
@sjmf
sjmf / verify_avfoundation_alignment.py
Last active April 21, 2026 17:48
Verify AVFoundation and OpenCV device alignment
#!/usr/bin/env python
"""
Verify that AVFoundation and OpenCV enumerate cameras in the same order.
Identity check (not just count): opens each OpenCV index in turn, then scans
AVFoundation devices for the one whose dimensions match to the default dims of
the device. That uniqueID is the ground-truth identity of the OpenCV-opened device.
The script compares against our enumerator's ordering and reports the real mapping.
Run with multiple cameras attached:
@sjmf
sjmf / README.md
Created October 11, 2025 15:22
Monorepo extractor

Monorepo Extractor

extract.sh

Let's say I have a private, monolithic git repo where I store my docker compose server configurations.

The folders are in a structure like this:

/ root
 |- project1/
@sjmf
sjmf / ssh.remote.service
Created August 5, 2025 19:18
Systemd configuration for persistent ssh reverse tunnel
[Unit]
Description=SSH tunnel service SSH on local port 22 to 22000 on remote host
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=0
[Service]
User=tunnel
Group=tunnel
Type=simple
@sjmf
sjmf / .wslconfig
Created June 7, 2025 13:23
Allow inbound traffic to WSL2 VM running in mirrored mode
[wsl2]
networkingMode=mirrored
[experimental]
hostAddressLoopback=true
@sjmf
sjmf / README.md
Last active April 4, 2024 18:23
HomeAssistant Configuration Files

Home Assistant Config for BuildAX

sensors.yaml

  • ⁠Contains a definition for a serial sensor called ‘bax’ -⁠ ⁠⁠Contains the eventual sensors for each data type, for each sensor
  • ⁠⁠HA understands a “sensor” to be of a single data type only. It can’t have multiple streams.

automations.yaml

  • ⁠Triggers the python script when the state of the sensor changes (i.e. a line is received over serial)
@sjmf
sjmf / automations.yaml
Last active February 24, 2024 23:09
Home Assistant Configuration for BuildAX Sensors
- id: process_serial_data
alias: Process Serial Data
description: Process Data from the BAX sensors
trigger:
- platform: state
entity_id: sensor.bax
action:
- service: python_script.process_serial_data
data:
data: '{{ trigger.to_state.state }}'
@sjmf
sjmf / gotbricks.js
Last active January 6, 2024 10:52
GotBricks? Userscript for Bricklink.com
// ==UserScript==
// @name GotBricks? for bricklink.com
// @namespace Violentmonkey Scripts
// @match https://www.bricklink.com/catalogItemInv.asp*
// @grant none
// @version 1.01
// @author Samantha Finnigan https://finnigan.dev/
// @description 05/01/2024, 17:09:39
// ==/UserScript==
@sjmf
sjmf / Controlling-Rpi-Blog.md
Last active November 11, 2023 16:42
Draft of Controlling a Raspberry Pi Without a Screen or Keyboard blogpost

Controlling a Raspberry Pi without a screen or keyboard

I’ve been working with Raspberry Pi hardware for a while. Part of my PhD research relied on embedded devices I made using Pi Zeros, and during my undergraduate research (over a decade ago now!), using the original Pi model A, I discovered why running a MySQL database on a Pi’s SD card was a bad idea…

Something that’s always bugged me working with these embedded computers is having to carry around an external keyboard and monitor, especially before setting anything up like WiFi or SSH access. I recently helped to run a hackathon at RSECon’23 as part of the Carpentries Offline project, and it very quickly became clear that carrying around lots of extra hardware to work with Pis (and other brands of embedded computer) is unwieldy, unreliable, and can totally take the joy out of hacking with them.

But, pretty much everyone there brought a laptop with them.

Viewing the video outpu

@sjmf
sjmf / accommodations.md
Last active January 15, 2024 14:57
Disability unconferencing recommendations to 2024 RSECon committee