Skip to content

Instantly share code, notes, and snippets.

@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 March 19, 2025 09:45
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

Create extroot partition labeled system (can be done on fresh Openwrt instalation)

mkfs.btrfs --checksum xxhash -m DUP /dev/nvme1n1pX -L system
mount /dev/nvme1n1pX /mnt && btrfs filesystem mkswapfile --size 16G /mnt/swapfile && umount /mnt
@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 \
@bademux
bademux / enable_hardware_acceleration.sh
Last active October 20, 2022 14:05
Enable hardware acceleration and dark mode for UngoogledChromium
~/.var/app/com.github.Eloston.UngoogledChromium/config/chromium-flags.conf << EOF
--enable-gpu-rasterization
--enable-oop-rasterization
--enable-gpu-compositing
--enable-accelerated-2d-canvas
--enable-zero-copy
--canvas-oop-rasterization
--enable-accelerated-video-decode
--enable-accelerated-video-encode
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiIgnoreDriverChecks
@bademux
bademux / Rockrobo-spotifyd.md
Last active November 28, 2021 13:39
Install Spotifyd on rooted rockrobo
  • Download spotifyd
wget -qO- https://github.com/Spotifyd/spotifyd/releases/download/v0.3.2/spotifyd-linux-armv6-slim.tar.gz | tar -xvz -C /opt
  • Add it to upstart nano /etc/init/spotifyd.conf
description "spotifyd service"
start on (local-filesystems and net-device-up IFACE!=lo) 
@bademux
bademux / APKBUILD
Last active August 8, 2021 23:11
alpine pkg that let you run installation hook, please see package()
# pkg that let you run installation hook, please see package()
# to enable it please
# 1. Run pmbootstrap init and add pmbootstrap-install-hook to custom packages
# 2. pmbootstrap newapkbuild pmbootstrap-install-hook && curl https://gist.githubusercontent.com/bademux/b3f8e9ae7d95f51f75307118ca6eb44a/raw/APKBUILD > ~/.local/var/pmbootstrap/cache_git/pmaports/main/pmbootstrap-install-hook/APKBUILD
pkgname=pmbootstrap-install-hook
pkgver=1
pkgrel=0
pkgdesc="Install dependencies and configs for headless server"
url="https://gist.github.com/bademux/b3f8e9ae7d95f51f75307118ca6eb44a"
arch="all"