Skip to content

Instantly share code, notes, and snippets.

@rlan
rlan / Dockerfile
Last active July 21, 2025 02:21
Dockerfile for OpenCC
# Run OpenCC in docker
# https://github.com/BYVoid/OpenCC
#
# Latest OpenCC build: 1.1.9+ds1-1build1
# Ubuntu 25.04 Plucky Puffin has this build.
# Ref: https://launchpad.net/ubuntu/+source/opencc
#
# Build:
# docker build -t opencc-docker .
#
@rlan
rlan / openwrt-tethering.md
Created July 16, 2025 22:16 — forked from brenr/openwrt-tethering.md
OpenWRT Smartphone Tethering

OpenWRT Router Pre-configured for Smartphone Tethering

In this guide, I'll be using:

  • iPhone 12 Pro on iOS 15.1.1 as my tethering device
  • Raspberry Pi 4 with OpenWRT version 21.02.1
  • 64GB Sandisk micro SD card

The goal with this guide is to create a pre-configured OpenWRT router that:

  • Is plug and play to provide out-of-the-box smartphone tethering
  • Supports both iPhone and Android (comment below if you are having any issues).
@rlan
rlan / tts.sh
Created February 3, 2025 13:02 — forked from nathanlesage/tts.sh
A small utility function to quickly convert a text file into a spoken track
# TTS COMMAND
#
# This command is a handy utility that allows you to quickly convert
# a text file into a speech recording.
#
# NOTE: This will only work on macOS, since it relies on the `say`
# command which utilizes Apple's speech synthesis system.
#
# REQUIRED: ffmpeg. You can easily install this using `brew install ffmpeg`
#
@rlan
rlan / github-gpg-key-with-private-email.md
Created February 1, 2025 14:40 — forked from nitrocode/github-gpg-key-with-private-email.md
Github "Verified" commits using GPG key with private email

Github "Verified" commits using GPG key with private email

It's nice to see a Verified message next to each commit for peace of mind.

Using GPG or S/MIME, you can sign tags and commits locally. These tags or commits are marked as verified on GitHub so other people can be confident that the changes come from a trusted source.

  1. Install latest gpg

    If using a mac use homebrew

@rlan
rlan / Creating GPG keys and subkeys.md
Last active February 1, 2025 18:07 — forked from gnzsnz/Creating GPG keys and subkeys.md
Creating GPG keys and subkeys

Creating GPG keys and subkeys

There are the steps to create GPG key pair and the additional steps to create a subkey.

Create GPG keys

gpg --full-generate-key
Please select what kind of key you want:
@rlan
rlan / pyenv_jupyter.sh
Last active January 30, 2025 08:24
Create a python virtual environment with Jupyter
#!/bin/bash -x
#
# Create a pyenv virtualenv with Jupyter
if [[ $# -eq 0 ]] ; then
echo 'Expect a python version: 3.12.8'
exit 1
fi
mkdir -p jupyter && \
@rlan
rlan / README.md
Created September 22, 2024 05:44 — forked from tomdaley92/README.md
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

@rlan
rlan / expenses.bean
Created May 13, 2024 02:07
Beancount expense accounts
1970-01-01 open Expenses:Education:Books
1970-01-01 open Expenses:Education:Classes
1970-01-01 open Expenses:Education:Tuition
1970-01-01 open Expenses:Food:Grocery
1970-01-01 open Expenses:Food:ConvenienceStore
1970-01-01 open Expenses:Food:Restaurant
1970-01-01 open Expenses:Home:Electricity
1970-01-01 open Expenses:Home:Gas
@rlan
rlan / install_blowfish_hugo_project.sh
Created April 14, 2024 01:04
Script for a fresh installation of Blowfish-theme Hugo project
#!/bin/bash
#
# Script for a fresh installation of Blowfish-theme Hugo project
# Method: Hugo submodule
# Blowfish theme: https://blowfish.page/docs/installation/
#
# Verified on:
# go version go1.22.2 darwin/arm64
# hugo v0.124.1-db083b05f16c945fec04f745f0ca8640560cf1ec+extended darwin/arm64 BuildDate=2024-03-20T11:40:10Z VendorInfo=brew
# Blowfish v2.65.0
@rlan
rlan / spotdl
Last active February 27, 2024 10:58
Bash script to use spotdl to download music from Spotify using official spotdl docker container
#!/bin/bash
usage() {
echo ""
echo "Usage: $0 [URL]"
echo "Example: $0 https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b"
}
if [ "$#" -ne 1 ]; then
echo "Invalid number of arguments!"