Skip to content

Instantly share code, notes, and snippets.

@matteohoeren
matteohoeren / svg_sanitizer.py
Created December 20, 2025 15:33
SVG Cleaner for Lasersaur
#!/usr/bin/env python3
"""
SVG Cleaner for Driveboard Laser Cutter
Removes Inkscape metadata and problematic characters from SVG files
"""
import os
import re
import sys
import xml.etree.ElementTree as ET
@matteohoeren
matteohoeren / sync-storage.ts
Created December 11, 2025 07:57
Supabase Storage Sync (Remote → Local)
/**
* Sync Storage Script
*
* This script downloads all assets from your production Supabase storage buckets
* and uploads them to your local Supabase instance.
*
* Setup:
* pnpm add -D dotenv ora chalk cli-progress @types/cli-progress
*
* Usage:
/**
* Shelly Plus 1PM Script - Absaugungssteuerung
* Logik: Relais EIN wenn (Input EIN) ODER (API arbeitet)
* Relais AUS nach Timeout wenn (Input AUS) UND (API Idle)
*/
let xtool_ip = "10.30.0.77";
let xtool_path = "http://" + xtool_ip + ":8080/status";
let poll_interval = 1000; // 1 Sekunde
@matteohoeren
matteohoeren / sticker.py
Created June 17, 2025 08:38
Python3 (WhatsApp) Sticker Compilation to A4
import os
import base64
import mimetypes
import math
import subprocess
from PIL import Image
from lxml import etree
# WARNING: This script was vibe coded. It takes a folder of stickers and puts them onto an A4 canvas for easy printing