Skip to content

Instantly share code, notes, and snippets.

@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 / delet_tweets.md
Last active August 14, 2025 21:19 — 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
@bademux
bademux / readme.md
Last active June 29, 2025 14:46
GPD Pocket 4 fix collection

Rotate boot screen

echo 'GRUB_CMDLINE_LINUX="quiet splash fbcon=rotate:1 video=eDP-1:panel_orientation=right_side_up"'>>/etc/default/grub 
update-grub

Update set orientation index with 1 value for Screen Rotate Gnome extention

Fingerprint scaner

@bademux
bademux / HOWTO_OPENWRT_HPt640.md
Last active August 18, 2025 00:24
Openwrt Install oh HP t640 ThinClient usb with extroot

The Idea is to have immutable yet extendable Openwrt instalation. For that purpose extroot is used.

First we need to download\create bootable image, image squashfs-combined-efi.img.gz

Installed packages:

apk-mbedtls base-files ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools grub2-bios-setup kmod-button-hotplug kmod-nft-offload libc libgcc libustream-mbedtls logd mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only partx-utils ppp ppp-mod-pppoe procd-ujail uci uclient-fetch urandom-seed urngd kmod-e1000 kmod-forcedeth kmod-fs-vfat kmod-r8169 luci luci-app-attendedsysupgrade pciutils usbutils parted losetup resize2fs curl nano lsblk amd64-microcode  block-mount kmod-usb-hid kmod-usb-ohci kmod-usb-serial kmod-usb3 kmod-usb2 kmod-usb-storage-uas acpid btrfs-progs nvme-cli smartmontools cpupower shadow-useradd iperf3 libubox

*libubox

@bademux
bademux / Jacoco2coberturaConverter.groovy
Last active April 16, 2024 19:03
Pure groovy jacoco2cobertura converter to be used with Gradle
import groovy.xml.XmlNodePrinter
import groovy.xml.XmlSlurper
import groovy.xml.slurpersupport.GPathResult
import groovy.xml.slurpersupport.NodeChild
import groovy.xml.slurpersupport.NodeChildren
import java.util.concurrent.TimeUnit
//put file into buildSrc/src/main/groovy
class Jacoco2coberturaConverter {
@bademux
bademux / tesseract-ocr-mrz.Dockerfile
Created January 4, 2024 18:43
Dockerfile.tesseract-ocr-mrz
FROM alpine:3.19 as mrz-builder
RUN apk --no-cache add --update make wget findutils bash unzip bc leptonica-dev python3 py3-pip tesseract-ocr tesseract-ocr-data-eng tesseract-ocr-data-pol
WORKDIR /build
RUN wget -qO- https://github.com/tesseract-ocr/tesstrain/archive/master.tar.gz | tar -zxv --strip-components=1
RUN pip install -r requirements.txt --break-system-packages
RUN make tesseract-langdata -e -j
RUN wget -qO- https://github.com/DoubangoTelecom/tesseractMRZ/archive/master.tar.gz | tar -zxv --strip-components=1
@bademux
bademux / sensorWatchBuilder.Dockerfile
Last active November 26, 2022 15:31
Sensor Watch Builder Dockerfile
#use DOCKER_BUILDKIT=1 to cache downloaded layer and --output to export built Artefact
FROM scratch as caching-downloader
ADD https://github.com/bademux/Sensor-Watch/archive/refs/heads/feature/vendoring_ext_libs.tar.gz /sensor-watch.tar.gz
#DOCKER_BUILDKIT=1 docker build --file builder.Dockerfile -t sensor-watch-builder --target builder . && docker run -it -p 8000:8000 sensor-watch-builder and then open http://localhost:8000
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y --no-install-recommends make libnewlib-arm-none-eabi gcc-arm-none-eabi emscripten &&\
rm -rf /var/lib/apt/lists/*
RUN adduser --disabled-password user
@bademux
bademux / JavaWine.Dockerfile
Last active November 6, 2022 20:14
java wine docker apline
#use DOCKER_BUILDKIT=1 to cache downloaded layer and --output to export built Artefact
#DOCKER_BUILDKIT=1 docker build --progress=plain --output type=tar,dest=../artefact.tar .
FROM scratch as caching-downloader
ADD https://api.adoptium.net/v3/binary/latest/19/ga/windows/x64/jdk/hotspot/normal/eclipse /jdk.zip
FROM alpine:3.16 as builder
RUN apk add --no-cache --update wine git util-linux
RUN adduser -D user
ENV WINEPREFIX=/home/user \
WINEDEBUG=-all \