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 June 1, 2024 19:46
Update your WireGuard public key in Mullvad via its public API
@izzyleung
izzyleung / README.md
Last active April 25, 2024 15:17
Run TeamCity agents in your Kubernetes cluster

How to run TeamCity agents in your Kubernetes cluster

For typical CI/CD tasks that don't require Docker daemon access, use the agent.yml pod sepc.

For CI/CD jobs that need Docker daemon to build Docker images, use the privileged-agent.yml pod spec.

Notes

Make sure you are running TeamCity server version >= 2020.1 or have the Kubernetes support plugin installed.

@izzyleung
izzyleung / AndroidManifest.xml
Created May 23, 2018 19:54
Example of how to use AutoValue in a Bazel Android Project
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.example"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="1"
android:targetSdkVersion="27" />
<application