Skip to content

Instantly share code, notes, and snippets.

@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
@loopj
loopj / wii_clang_rules
Last active October 12, 2021 20:01
devkitPPC rules for building apps with Clang
#---------------------------------------------------------------------------------
# devkitPPC rules for building with Clang
#
# How to use:
# - Copy this file into your DEVKITPPC path:
# cp wii_clang_rules $DEVKITPPC
#
# - Link Clang into your DEVKITPPC path:
# ln -s `which clang` $DEVKITPPC/bin/powerpc-eabi-clang
#
// // cur_evnt_full.begin format
// {
// "day":12,
// "month":9,
// "year":2019,
// "hour24":15,
// "hour12":3,
// "minutes":0,
// "ampm":"pm",
// // offset in minutes from now,
@loopj
loopj / fiddle.css
Last active December 2, 2018 21:46
AWS Instance Chart
html, body {
height: 100%;
padding: 0;
margin: 0;
}
#chart {
height: 100%;
}