Skip to content

Instantly share code, notes, and snippets.

View fathonix's full-sized avatar
💭
I may be slow to respond.

Aldo Fathoni fathonix

💭
I may be slow to respond.
View GitHub Profile
@fathonix
fathonix / udpspeeder
Last active October 9, 2025 10:14
Systemd service for UDPspeeder
# /etc/default/udpspeeder
ARGS="-c -l0.0.0.0:3333 -r44.55.66.77:4096 -f20:10 -k passwd"
@fathonix
fathonix / fwzone.sh
Created September 18, 2025 20:14
Modify OpenWrt firewall zone of an interface
#!/bin/sh
# fwzone.sh - Modify OpenWrt firewall zone of an interface
# Licensed under MIT. (c) 2025 Aldo Adirajasa Fathoni
action="$1"
iface="$2"
zone="$3"
msg() {
echo $@
@fathonix
fathonix / dyngwdomain.sh
Last active September 18, 2025 20:16
Local DDNS for gateway IPs on OpenWrt
#!/bin/sh
# dyngwdomain.sh - Local DDNS for gateway IPs on OpenWrt
# Licensed under MIT. (c) 2025 Aldo Adirajasa Fathoni
domain="$1"
iface="$2"
msg() {
echo $@
logger -t dyngwdomain.sh[$$] "$@"
@fathonix
fathonix / radio-sunnah-indonesia.m3u
Last active May 20, 2025 19:47
Playlist Radio Sunnah Indonesia
#EXTM3U
#PLAYLIST: Radio Sunnah Indonesia
#EXTINF:-1 group-title="Radio Sunnah Indonesia", Radio Rodja 756 AM dan 100.1 FM
https://radioislamindonesia.com/rodja.mp3
#EXTINF:-1 group-title="Radio Sunnah Indonesia", Radio Rodja Bandung 104.3 FM
https://radioislamindonesia.com/rodja-bandung.mp3
#EXTINF:-1 group-title="Radio Sunnah Indonesia", Radio Rodja Majalengka 93.1 FM
https://radioislamindonesia.com/rodja-majalengka.mp3
#EXTINF:-1 group-title="Radio Sunnah Indonesia", Rodja TV - Satelit Telkom 4
https://radioislamindonesia.com/rodjatv.mp3
@fathonix
fathonix / README.md
Created November 10, 2024 06:01
Android as Microphone w/ Echo Cancellation on Linux with PipeWire + ROC + RNNoise
@fathonix
fathonix / README.md
Created November 10, 2024 01:47
Use Android Phone as Microphone w/ Echo Cancellation on Linux with PipeWire + ROC

Use Android Phone as Microphone w/ Echo Cancellation on Linux with PipeWire + ROC

Follow this tutorial first on setting up ROC: https://gavv.net/articles/roc-0.4/

Instead of following the config file provided on the tutorial, use this config to route ROC source to a Loopback device and an Echo Cancel device.

Restart PipeWire afterwards:

systemctl restart --user pipewire.service
@fathonix
fathonix / svgtocsv.py
Last active September 26, 2024 17:45
Python script to convert SVG to CSV containing starting and ending XY coordinates
#!/usr/bin/env python3
"""
Adapted from https://stackoverflow.com/a/65851533
The input SVG must be flattened/combined into single node/path first.
Recommended to optimize the SVG first with SVGO or Inkscape's Save As Optimized SVG.
First two columns are the starting coordinates and the second ones are the ending ones.
"""
from xml.dom import minidom
from svg.path import parse_path
@fathonix
fathonix / install.sh
Last active May 14, 2024 04:16
Install Rembg with CoreML support to use Neural Engine
#!/bin/bash -e
# Install Rembg with CoreML support to use Neural Engine
# Tested on macOS 14.1, M1 MBP, 2024-05-14
# Licensed under MIT. (c) 2024 Aldo Adirajasa Fathoni
# Assuming Xcode CLT and Homebrew have been installed
brew install [email protected]
mkdir rembg-env
/opt/homebrew/bin/python3.9 -m venv rembg-env
source rembg-env/bin/activate
@fathonix
fathonix / install.sh
Last active May 14, 2024 04:15
Install Apple Silicon-native Spleeter without Conda
#!/bin/bash -e
# Install Apple Silicon-native Spleeter without Conda
# Tested on macOS 14.1, M1 MBP, 2024-05-07
# Licensed under MIT. (c) 2024 Aldo Adirajasa Fathoni
# Assuming Xcode CLT and Homebrew have been installed
brew install [email protected] ffmpeg libsndfile
mkdir spleeter
python3.9 -m venv spleeter
source spleeter/bin/activate
@fathonix
fathonix / retouchid.sh
Created April 25, 2024 07:04
Script to enable PAM authentication with Touch ID on macOS
#!/bin/sh
# retouchid - Script to enable PAM authentication with Touch ID on macOS
# Licensed under MIT. (c) 2022 Aldo Adirajasa Fathoni
if grep -q pam_tid.so /etc/pam.d/sudo; then
echo "Already set. no need to update /etc/pam.d/sudo."
exit 0
fi
if [ $(id -u) = 0 ];then