Skip to content

Instantly share code, notes, and snippets.

@izzyleung
izzyleung / setup.sh
Created May 23, 2024 19:19
Manage Homebridge as a SystemD service via Podman
#!/usr/bin/env bash
SYSTEMD_SERVICE_NAME="homebridge"
SYSTEMD_USER_DIR="$HOME/.config/systemd/user"
SYSTEMD_SERVICE_FILE="${SYSTEMD_USER_DIR}/${SYSTEMD_SERVICE_NAME}.service"
HOMEBRIDGE_VOLUME_DIR="$HOME/.containers/volumes/homebridge"
podman pull docker.io/homebridge/homebridge
@izzyleung
izzyleung / README.md
Last active May 23, 2024 19:20
Simplified QMK firmware building guide

Prerequisite

  • Podman or Docker
  • Git

Clone the repository with all the submodules

$ git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git

Create your keymap

@izzyleung
izzyleung / README.md
Last active April 15, 2024 17:51
Strands from New York Times Assistant

Assistant for New York Times Puzzle - Strands

This is a super primitive assistant to help you solve Strands from New York Times

Explanation

  • Read words from /usr/share/dict/words
  • Build Trie
  • BFS on each coordinate, only search when neighbor is not seen, and its letter can make up a word
How to cheat
@izzyleung
izzyleung / README.md
Last active July 17, 2023 21:50
NYT Digits Solver

About

This is a program that tries to solve the New York Times Digits game

Usage:

usage: digits_solver [-h] number number number number number number number

NYTimes Digits Solver

positional arguments:
@izzyleung
izzyleung / README.md
Last active August 14, 2024 20:05
Update your WireGuard public key in Mullvad via its public API

Generate a new pair of keys via wg

$ wg genkey | tee privatekey | wg pubkey > publickey

Rotate your public key via the same logic as in Mullvad's source code:

  • Step 1: Obtaining an access token:
$ curl -fsSL -X POST \
    -H 'Content-Type: application/json' \