Skip to content

Instantly share code, notes, and snippets.

View s-geissler's full-sized avatar

Stefan Geißler s-geissler

View GitHub Profile
@s-geissler
s-geissler / snapmaker_u1_monitor.html
Created January 9, 2026 22:40
A simple HTML file that embeds the snapmaker U1 camera into a semi-live feed
<!DOCTYPE html>
<html>
<head>
<title>Dynamic Printer Monitor</title>
<style>
body { margin: 0; background: #111; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; overflow: hidden; font-family: sans-serif; }
img { max-width: 100%; max-height: 100%; border: 2px solid #333; }
#info { position: absolute; top: 10px; right: 10px; color: #00ff00; font-size: 12px; text-align: right; opacity: 0.7; }
</style>
</head>
@s-geissler
s-geissler / fancontrol.sh
Last active December 29, 2024 04:34
Manual fancontrol on Raspberry Pi 5 for Ubuntu 23.10 64bit
#!/bin/bash
round() {
printf "%.${2}f" "${1}"
}
debug() {
if [[ $debug -eq 1 ]]; then
echo "[$(date)] [DEBUG] $1" >> "$2"
fi
@s-geissler
s-geissler / NEC-MTP.py
Created November 28, 2016 09:48
NEC Multitable Processing
from ryu.base import app_manager
from ryu.controller import dpset
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
from ryu.ofproto import ether
from ryu.lib.packet import packet, ethernet
from ryu.lib import mac
from time import sleep