Skip to content

Instantly share code, notes, and snippets.

View Mqxx's full-sized avatar
:atom:
Always remember

Mqx Mqxx

:atom:
Always remember
  • Loat.dev
  • Somewhere in Germany
View GitHub Profile
@Mqxx
Mqxx / diff.sh
Last active June 6, 2026 21:51
Simple visual directory diff using rsync.
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
echo "Usage: $0 <source> <destination>"
exit 1
fi
DIRA="$1"
DIRB="$2"
@Mqxx
Mqxx / dependency-tree.html
Created March 20, 2026 11:55
Self contained HTML Node editor with build in interactive viewer
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Editor | Dependency Tree</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='3' r='2.5' fill='%232d5be3'/><circle cx='4' cy='14' r='2.5' fill='%232d5be3' opacity='.6'/><circle cx='16' cy='14' r='2.5' fill='%232d5be3' opacity='.6'/><line x1='10' y1='5.5' x2='4.8' y2='11.8' stroke='%232d5be3' stroke-width='1.5' opacity='.4'/><line x1='10' y1='5.5' x2='15.2' y2='11.8' stroke='%232d5be3' stroke-width='1.5' opacity='.4'/></svg>">
<style>
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');
@Mqxx
Mqxx / build_docker_multi_arch_image_native_runner_example.yml
Last active March 6, 2026 11:25
Build a multi-arch image for Docker on GitHub Actions using native runners and a matrix.
name: 'Build and Push Docker Image'
description: |
This workflow runs on every release.
It builds and publishes a new Docker image and pushes that image to the GitHub Container Registry (ghcr.io)
on:
release:
types:
- created
@Mqxx
Mqxx / minecraft_server_management.ts
Created February 10, 2026 19:27
Minecraft JSON-RPC 2.0 Test Client
import * as ansi from "jsr:@std/cli/unstable-ansi";
import {promptSecret} from "jsr:@std/cli/prompt-secret";
import {promptSelect} from "jsr:@std/cli/unstable-prompt-select";
import * as colors from "jsr:@std/fmt/colors";
function write(data : string) {
Deno.stdout.write(new TextEncoder().encode(data));
}
const address = prompt('Address (<management-server-host>:<management-server-port>):');
@Mqxx
Mqxx / projector_screen.ino
Last active January 3, 2026 18:43
Script for modding the "ESMART MIMOTO Professional" electric projector screen. Extends the functionality of the controller to integrate seamlessly into Home Assistant.
/*
Script for modding the "ESMART MIMOTO Professional" electric projector screen. Extends the functionality of the controller to integrate seamlessly into Home Assistant.
*/
#ifndef ZIGBEE_MODE_ED
#error "Zigbee end device mode is not selected in Tools->Zigbee mode"
#endif
@Mqxx
Mqxx / README.md
Last active December 11, 2025 09:09
Load binaries from JSR.

Package on JSR:

deno.json

{
  "name": "@my-package/binary", 
  "version": "0.1.0",
  "exports": {
    ".": "./src/binary.ts" 
  } 
}
@Mqxx
Mqxx / README.md
Last active November 20, 2025 14:57
Setup Orange Pi 5 Pro.

Change Hostname

read -p "New Hostname: " new_hostname && \
sudo hostnamectl set-hostname "$new_hostname" && \
sudo reboot

Mount NFS

sudo apt-get install nfs-common -y &amp;&amp; \
@Mqxx
Mqxx / docker_setup.sh
Last active November 19, 2025 21:21
Setup and install Docker.
# Remove old Docker Packages
echo '### Remove old Docker Packages ###'
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1) -y
# Add Docker's official GPG key
echo "### Add Docker's official GPG key ###"
sudo apt update -y
sudo apt install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
@Mqxx
Mqxx / boot_leds.service
Last active April 17, 2026 19:17
Setup Orange Pi 5 Pro to boot from NVMe SSD (No SPI flash)
[Unit]
Description=Orange Pi 5 Pro boot LEDs
DefaultDependencies=no
Before=sysinit.target
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
function New-ProgressBar {
param(
[string]$Message = ""
)
$esc = [char]27
$windowWidth = [Console]::WindowWidth
$windowHeight = [Console]::WindowHeight
$barWidth = $windowWidth - 10