Skip to content

Instantly share code, notes, and snippets.

@bademux
bademux / RTLPlayground.Dockerfile
Last active June 30, 2026 18:12
build RTLPlayground firmware in docker
#DOCKER_BUILDKIT=1 docker build --progress=plain --file Dockerfile --output type=tar,dest=artefact.tar .
FROM scratch AS caching-downloader
ADD https://github.com/logicog/RTLPlayground/archive/refs/heads/main.tar.gz /RTLPlayground.tar.gz
FROM debian:13-slim AS builder
ARG MACHINE="PCB_SWTG024AS_A_2_0_1"
RUN apt update &&\
apt install -y --no-install-recommends ca-certificates wget gpg make gcc sdcc xxd python-is-python3 libjson-c-dev build-essential &&\
rm -rf /var/lib/apt/lists/*
RUN groupadd -r user && useradd -r -g user user
@bademux
bademux / incus_mcstreaming.sh
Last active June 15, 2026 22:19
prepare priv\pub keys and download IcusOS
#!/usr/bin/env bash
incus launch images:debian/trixie mcj
incus config device add mcj gpu gpu pci=0000:04:00.0
incus config device add mcj eth0 nic nictype=macvlan parent=enp2s0f0
incus config set mcj security.nesting=true
incus restart mcj
incus config device show mcj
incus config device add mcj uinput unix-char source=/dev/uinput path=/dev/uinput mode=0660 gid=104
incus exec mcjbn -- bash
@bademux
bademux / etc_init.d_homeassistant
Last active June 22, 2026 16:59
wyse 3040 NAS firmware downloader
#!/bin/sh /etc/rc.common
EXTRA_COMMANDS="status"
START=99
STOP=10
USE_PROCD=1
PROG=/usr/bin/podman
# Configuration settings
USER_NAME="homeassistant"
@bademux
bademux / config.yaml
Created May 7, 2026 22:49
Integration of Goose ACP with Lemonade AI .config/goose/config.yaml and .config/goose/custom_providers/custom_lemonade.json
GOOSE_PROVIDER: lemonade
GOOSE_MODEL: gemma4-it-e4b-FLM
GOOSE_TELEMETRY_ENABLED: false
@bademux
bademux / debload_tcl.sh
Created January 5, 2026 17:42
debload TCL
#!/bin/sh
# run adb connect 192.168.1.100:5555
adb shell sh << 'EOF'
echo "com.tcl.smartalexa
com.tcl.gallery
com.tcl.messagebox
com.tcl.guard
com.tcl.dashboard
@bademux
bademux / buildopenwrt.Dockerfile
Created September 28, 2025 17:36
build Openwrt
# run with `docker build --progress=plain -f buildopenwrt.Dockerfile --output type=tar,dest=out.tar .`
FROM debian:13-slim AS builder
# revision (tag or commitId) can be obtained with `source /etc/openwrt_release && echo $DISTRIB_REVISION`
ARG REV="e74cd41744df015e770ed533d0be8e5b1f03765e"
RUN apt update && apt install -y --no-install-recommends git ca-certificates build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext libncurses5-dev libssl-dev python3-setuptools rsync swig unzip zlib1g-dev file wget
RUN useradd --system user
USER user
WORKDIR /home/user
RUN git init && git remote add origin https://github.com/openwrt/openwrt.git && \
@bademux
bademux / HOWTO_OPENWRT_MININAS.md
Last active August 16, 2025 19:38
openwrt nas syncthing

Install Openwrt

Add packages

opkg update && opkg install partx-utils kmod-fs-vfat luci-app-attendedsysupgrade usbutils parted resize2fs curl nano lsblk block-mount kmod-usb-hid kmod-usb-ohci kmod-usb3 kmod-usb-storage btrfs-progs nvme-cli smartmontools iperf3 luci-app-commands luci-app-samba4 syncthing

notes: for some unknown reason classic samba server is a way faster then ksmdb if sendfile option is enabled (enable_extra_tuning), see cifsd-team/ksmbd#621

@bademux
bademux / del_tweets.md
Last active June 15, 2026 16:30 — forked from trepmal/delet_tweets.md
Delete your old tweets with this disgusting bash script

100% free. Runs completely locally on your machine. Bypasses the 3200 tweet limit. May require some eye bleach for the script. Here's how to use it:

  1. Go to settings -> account -> your Twitter data and request a download. This may take a few hours. You'll get an email with a link to download a zip file. Extract the zip file and navigate to the data directory.

  2. Go to Twitter in a web browser and find any Tweet you want to delete. We're going to use it to extract your authentication credentials for the next step. Open developer tools, delete the tweet, and find the request

@bademux
bademux / Dockerfile
Last active July 19, 2025 11:47
Build latest pspi drivers
#docker buildx create --name multiarch --driver docker-container --use
#docker buildx build --progress=plain --platform linux/arm64,linux/arm/v7 --output type=tar,dest=out.tar .
FROM scratch AS caching-downloader
ADD https://github.com/othermod/PSPi-Version-6/archive/refs/heads/main.tar.gz /pspi.tar.gz
FROM debian:12-slim AS builder
RUN apt update && apt install -y --no-install-recommends ca-certificates wget gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/raspberrypi.gpg] https://archive.raspberrypi.org/debian bookworm main" > /etc/apt/sources.list.d/raspberrypi.list
RUN wget -qO - https://archive.raspberrypi.org/debian/raspberrypi.gpg.key | gpg --dearmor -o /etc/apt/keyrings/raspberrypi.gpg
RUN apt update
@bademux
bademux / ryzen_control.Dockerfile
Created June 12, 2025 19:09
build RyzenAdj and ryzen_smu kernel module in docker
# use DOCKER_BUILDKIT=1 to cache downloaded layer and --output to export built Artefact
# DOCKER_BUILDKIT=1 docker build --progress=plain --file ryzen_control.Dockerfile --output type=tar,dest=artefact.tar .
# unpack: tar -zxvf /tmp/ryzen_smu.tar.gz
# to install build dkms module use: dkms ldtarball ryzen_smu.dkms.tar.gz
# to check version: dkms status | grep ryzen_smu
# to install: dkms install --modprobe-on-install --force ryzen_smu/0.1.6
ARG UBUNTU_VERSION="25.04"
FROM scratch AS caching-downloader
# change versions of ryzen_adj and ryzen_smu here