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 / mcp.schema.json
Created August 11, 2026 18:13
JSON Schema for the MCP server definition.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MCP Servers Configuration",
"type": "object",
"required": ["mcpServers"],
"additionalProperties": false,
"properties": {
"mcpServers": {
"type": "object",
"description": "Map of server names to their configuration",
@Mqxx
Mqxx / compose.yml
Last active August 11, 2026 17:56
Docker Compose LLM template.
services:
llama.cpp:
# 1. Use the ROCm image for AMD GPUs
image: ghcr.io/ggml-org/llama.cpp:server-rocm
environment:
- LLAMA_ARG_JINJA=true
- LLAMA_ARG_MCP_SERVERS_CONFIG=/config/mcp_config.json
- LLAMA_ARG_HOST=0.0.0.0
- LLAMA_ARG_MODEL_PATH=/models
- LLAMA_ARG_CORS_ORIGINS=*
@Mqxx
Mqxx / init.sh
Last active August 4, 2026 18:43
Setup/Initialize Fedora Server installed on a SD card for a Raspberry Pi
#!/bin/sh
# Change keyboard layout to DE (german)
sudo localectl set-keymap de
# Set default to yes
sudo sed -i '/\[main\]/a defaultyes=True' /etc/dnf/dnf.conf
# Setting hostname
read -p "Please enter new hostname (default: 'raspberry-pi'): " NEW_HOSTNAME
/**
* mcfunctionToAnsi.ts
* ---------------------------------------------------------
* Wandelt mcfunction-Code in einen Discord-Codeblock mit
* ANSI-Escape-Codes um (```ansi ... ```), damit Kommandos,
* Selektoren, Strings, Zahlen etc. farbig hervorgehoben werden.
*
* Discord unterstützt ANSI-Farben nur innerhalb von
* ```ansi
* ...
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>modern-monaco ohne Bracket Colors</title>
<style>
html, body {
margin: 0;
@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