Skip to content

Instantly share code, notes, and snippets.

@loopj
loopj / com.sendspin-audio.daemon.plist
Last active May 14, 2026 21:18
Run sendspin in the background and start at boot on MacOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://apple.com">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sendspin-audio.daemon</string>
<key>ProgramArguments</key>
<array>
<!-- Replace with the path to sendspin cli -->
<string>/Users/james/.local/bin/sendspin</string>
@loopj
loopj / gccadapter.py
Created October 15, 2025 18:54
Quick and dirty python script to read/write to Nintendo GameCube Controller Adapters
# pip install hidapi
import hid
import argparse
VID = 0x057E
PID = 0x0337
def open_dev():
h = hid.device()
@loopj
loopj / create_gbl.py
Last active August 20, 2025 05:58
Create a simple (non encrypted, non compressed) Gecko Bootloader .gbl file from a .bin file.
#!/usr/bin/env python3
"""
Create a simple (non encrypted, non compressed) Gecko Bootloader .gbl file from a .bin file.
Documented in Silicon Labs UG266:
https://www.silabs.com/documents/public/user-guides/ug266-gecko-bootloader-user-guide.pdf
"""
import sys
import struct
@loopj
loopj / vantage_button_held.yaml
Created February 22, 2025 22:37
Trigger an action when a Vantage button is held for more than a specified time.
blueprint:
name: "Vantage Button Held"
description: "Trigger an action when a Vantage button is held for more than a specified time."
domain: automation
input:
button_id:
name: "Vantage Button ID"
description: "The ID of the button to monitor."
selector:
number:
@loopj
loopj / grrlib.cmake
Created September 20, 2024 18:53
Reusable interface library target for GRRLIB which includes dependencies and compile flags
# Reusable interface library target for GRRLIB which includes dependencies and compile flags
set(GRRLIB_TARGET grrlib_interface)
# Include the pkg-config module
find_package(PkgConfig REQUIRED)
pkg_check_modules(GRRLIB REQUIRED freetype2 libpng libjpeg)
# Define the library target
add_library(${GRRLIB_TARGET} INTERFACE)
@loopj
loopj / regulator-comparison.md
Last active January 17, 2024 04:02
# Notes on programmable, multi-channel regulator ICs for Wii undervolting

Notes on programmable, multi-channel regulator ICs for Wii undervolting

  • TPS65216
    • TL;DR
      • Pros: cheap, bonus LDO
      • Cons: inefficient, large footprint, no NVM
    • 3 x buck @ 1.8A, 1 x buck/boost @ 1.6A, 1 x LDO
    • 6 x 6mm QFN package
    • Push button monitor
  • No internal NVM, needs to be configured on boot
@loopj
loopj / generate-board-images.sh
Created December 18, 2023 20:17
Generate PCB renders (SVG and PNG) from KiCad
#!/usr/bin/env bash
mkdir -p temp
cd temp
# Export gerbers
kicad-cli pcb export gerbers ../pcbname.kicad_pcb -l F.Cu,B.Cu,F.Paste,B.Paste,F.SilkS,B.SilkS,F.Mask,B.Mask,Edge.Cuts
# Generate SVGs
tracespace -L *.*
@loopj
loopj / home-assistant-skyconnect-docker.md
Created August 14, 2023 21:07
Home Assistant SkyConnect without Home Assistant OS

Open Thread Border Router

version: '3'
services:
  otbr:
    image: openthread/otbr
    container_name: otbr
    ports:
 - '8080:80'
@loopj
loopj / waveshare-amoled-armbian.md
Created August 10, 2023 20:44
WaveShare 5.5inch AMOLED on Armbian

WaveShare 5.5inch AMOLED on Armbian

Rotate screen 90 degrees clockwise (console)

Add the following to /boot/armbianEnv.txt:

extraargs=fbcon=rotate:1
@loopj
loopj / armbian-hdmi-rotate.md
Created August 10, 2023 20:20
Rotate console by 90 degrees on Armbian

Rotate console by 90 degrees on Armbian

Add the following to /boot/armbianEnv.txt

extraargs=fbcon=rotate:1