Skip to content

Instantly share code, notes, and snippets.

View danielrosehill's full-sized avatar

Daniel Rosehill danielrosehill

View GitHub Profile
@danielrosehill
danielrosehill / bambam-on-wayland.md
Created July 23, 2026 18:49
Getting bambam (the baby keyboard-masher game) running on Linux Wayland — KDE Plasma / GNOME

Getting bambam (the baby keyboard toy) working on Wayland

bambam is a lovely little "keyboard masher" game for babies and toddlers: they bash the keyboard and mouse, and instead of emailing your boss or closing your windows, the screen fills with colourful shapes, letters and sounds. It grabs the keyboard/mouse so the little one can't wreck anything.

Install is a one-liner on Debian/Ubuntu:

@danielrosehill
danielrosehill / gerber-prime-6000-local-control-cheatsheet.md
Created July 15, 2026 19:56
Gerber Prime 6000 / PSC05 smart-home controller — local HTTP control cheat sheet (no cloud): /sdk.cgi + /network.cgi API, gotchas, minimal Python

Gerber Prime 6000 / PSC05 — local control cheat sheet (no cloud)

Controlling a Gerber Prime 6000-series smart-home controller (relay / shutter DIN-rail box, "Home Mate 2" app, config Wi-Fi named PSC05-<mac>) locally over HTTP, no vendor cloud. Reverse-engineered from its web UI. Full code + docs: https://github.com/danielrosehill/gerber-prime-6000-local-api

Defaults (vendor, from FCC manual)

  • Web UI / API: admin / 888888 (HTTP Basic)
  • Config Wi-Fi (SoftAP) WPA key: 12345678, gateway 10.10.10.254
@danielrosehill
danielrosehill / fix-oneplus-autorotate-adb.md
Created June 19, 2026 20:01
Fix OnePlus / OxygenOS auto-rotate that ignores the UI toggle, via ADB (accelerometer_rotation flag desync)

Fixing OnePlus / OxygenOS auto-rotate that ignores the UI toggle (via ADB)

Problem: On a OnePlus device (OxygenOS / ColorOS), the screen keeps auto-rotating even though the Auto-rotate toggle in the UI / Quick Settings is switched off.

Root cause: The visible OxygenOS toggle and the underlying Android framework flag system.accelerometer_rotation can drift out of sync. The framework flag stays at 1 (rotation enabled) while the UI shows it off. OxygenOS's rotation-suggestion feature can also silently re-assert rotation behaviour. The fix is to set the framework flags directly with ADB.

@danielrosehill
danielrosehill / chrome-global-shortcuts-fix.md
Created June 2, 2026 11:39
Fix: Chrome re-prompting for global shortcuts on every launch (KDE Plasma Wayland)

Stop Chrome re-prompting for "global shortcuts" on every launch (KDE Plasma Wayland)

Symptom

On KDE Plasma (Wayland), every time you open Google Chrome (or Chromium) you get a permission prompt along the lines of:

"An application wants to use global shortcuts" / "Global Shortcuts Requested"

You click Allow, but the prompt comes back the next time you launch Chrome. It never sticks.

@danielrosehill
danielrosehill / obs-muxer-apparmor-fix.md
Created April 29, 2026 15:07
Fix: OBS Studio "Couldn't initialize muxer" on Ubuntu 24.04+ / 25.10 (AppArmor userns)

OBS Studio: "Couldn't initialize muxer" on Ubuntu 24.04+ / 25.10

If OBS Studio refuses to record on a recent Ubuntu (24.04, 24.10, 25.04, 25.10) with this dialog:

An encoder error occurred while recording: Couldn't initialize muxer

…and the OBS log (~/.config/obs-studio/logs/) shows:

[ffmpeg muxer: 'simple_file_output'] os_process_pipe_write for info structure failed
@danielrosehill
danielrosehill / gist:7e0386c10b35f02909e7c37f94ece499
Created December 13, 2025 22:57
Fix Electron app sandbox crashes on Linux (Ubuntu/KDE) - No comments
# Fix Electron App Sandbox Crashes on Linux
Electron apps on Linux often fail to launch with errors like:
- `signal=TRAP`
- Sandbox-related crashes
- Apps that work with `--no-sandbox` but fail otherwise
## The Problem
Electron's sandbox requires either:
@danielrosehill
danielrosehill / mcp-infrastructure-tools.md
Created December 12, 2025 19:38
MCP Proxies, Gateways, Routers & Federation Tools - December 2025

MCP Infrastructure Tools: Proxies, Gateways, Routers & Federation

Last updated: December 12, 2025

A curated list of tools for Model Context Protocol (MCP) federation, routing, aggregation, and access control.


🌐 Gateways

@danielrosehill
danielrosehill / conda-rocm-strategy.md
Created December 12, 2025 12:29
Conda Environment Strategy for AMD ROCm GPUs - Minimizing Disk Usage

Conda Environment Strategy for AMD ROCm GPUs

Managing conda environments for AI/ML workloads on AMD GPUs can quickly consume 100GB+ of disk space. The PyTorch ROCm stack alone is ~18GB, and each new environment duplicates this.

The Problem

Creating environments independently:

# BAD: Each env duplicates the full PyTorch ROCm stack (~18GB each)
conda create -n project1 python=3.12
@danielrosehill
danielrosehill / ip-cam-viewer.kwinrule
Created December 11, 2025 12:55
KWin window rule for attaching IP Cam Viewer to a dedicated 7-inch monitoring screen
[af9dac22-676b-48fc-9cea-45ef1d877efe]
Description=IP Cam Viewer
fullscreen=true
fullscreenrule=2
ignoregeometry=true
ignoregeometryrule=2
noborder=true
noborderrule=2
position=5760,480
positionrule=2
@danielrosehill
danielrosehill / rocm-pytorch-rx7700xt-compatibility.md
Created December 8, 2025 11:04
ROCm 6.4.4 + PyTorch 2.7.1 Docker Image - AMD RX 7700 XT Compatibility

ROCm 6.4.4 + PyTorch 2.7.1 Docker Image - AMD RX 7700 XT/7800 XT Compatibility

Image Details

Property Value
Image rocm/pytorch:rocm6.4.4_ubuntu24.04_py3.12_pytorch_release_2.7.1
Size 69.6 GB
ROCm Version 6.4.4
PyTorch Version 2.7.1