Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / redis-sse.js
Created October 26, 2012 23:29
Connect middleware for pub/sub using server-sent events
//
// Simple pub/sub using redis and server-sent events (EventSource)
//
// Usage:
//
// // Attach the middleware
// redisSse = require("redis-sse");
// app.use(redisSse({redis: yourRedisClient}));
//
// // Set up a subscription to a channel in your route
@loopj
loopj / passenger-nginx-spdy.sh
Created August 5, 2012 20:21
Install passenger and nginx with SPDY support
#!/bin/sh
NGINX_VERSION=1.3.8
TMP_PATH=/tmp
# Fetch and extract Nginx
cd $TMP_PATH
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
tar xvfz nginx-$NGINX_VERSION.tar.gz
cd nginx-$NGINX_VERSION
@loopj
loopj / nginx-config-spdy-example
Created August 5, 2012 22:24
Nginx SPDY configuration example
server {
listen 443 ssl spdy default_server;
server_name example.com;
ssl_certificate /etc/ssl/certs/my.ssl.crt;
ssl_certificate_key /etc/ssl/private/my.ssl.key;
root /mysite/current/public;
passenger_enabled on;