Skip to content

Instantly share code, notes, and snippets.

View adlerweb's full-sized avatar

Florian Knodt adlerweb

View GitHub Profile
@adlerweb
adlerweb / 0001-client-wayland-fix-clipboard-crash-and-client-to-ser.patch
Created October 26, 2026 16:13
✨ wlfreerdp / Wayland Copy&Paste crash fix
From 618755fbfbf675a65b29f01a5ab08783ac16377c Mon Sep 17 00:00:00 2001
From: adlerweb <git@adlerweb.info>
Date: Mon, 26 Oct 2026 17:11:23 +0100
Subject: [PATCH] [client,wayland] fix clipboard crash and client to server
transfers
All wayland display access now happens in the main loop. The channel
thread used to call UwacClipboardOfferAnnounce and UwacClipboardDataGet,
which do roundtrips on the display while the main thread dispatches it.
That tripped the assertion in wl_display_dispatch_queue when the host
@adlerweb
adlerweb / motorrad.yaml
Last active October 4, 2026 00:08
motorrad.yaml
# Board: ESP32-C3 Super Mini (Generic)
esphome:
name: motorrad
friendly_name: Motorrad
min_version: 2024.6.0
on_boot:
priority: -100
then:
- delay: 2s
@adlerweb
adlerweb / tfttest.cpp
Created March 22, 2026 01:24
TFT Example
#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include "time.h"
#include <WiFi.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <Adafruit_INA219.h>
esphome:
name: rgbtube
friendly_name: rgbtube
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
# Enable logging
@adlerweb
adlerweb / pvlvs.py
Created December 4, 2025 22:17
LVM: Script to show all LVs (or segments of LVs) on a specific PV. Handy for rebalancing. Beware: Vibecoded, might kill your system and some kittens.
#!/usr/bin/env python3
import sys
import subprocess
import shlex
try:
import humanize
except ImportError:
humanize = None
@adlerweb
adlerweb / battest.yaml
Created April 27, 2025 02:47
battest.yaml
esphome:
name: battest
friendly_name: battest
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
# Enable logging
@adlerweb
adlerweb / main.cpp
Created March 8, 2025 22:45
LoRaWAN Sensor Node based on Heltec Wireless Stick Lite V3 + DS18B20
#include <Arduino.h>
#include <heltec_unofficial.h>
#include <LoRaWAN_ESP32.h>
#include <OneWire.h>
#define HELTEC_WIRELESS_STICK_LITE
#define MINIMUM_DELAY 300 //300 Sekunden = 5 Minuten
const char* band = "EU868";
const uint8_t subband = 0;
@adlerweb
adlerweb / postLimit.sh
Last active April 18, 2025 22:09
Mastodon v4.3.x (<4.3.4) docker post character limit change
#!/bin/bash
# Mastodon v4.3.x docker character limit change
# Does *NOT* word with >= 4.3.4 as the handling was changed
# Based on https://mpp-service.de/en/mastodon-character-limit-increase-in-a-docker-environment/
# Based on https://fouquet.me/2024/10/10/mastodon-4-3-char-limit
# ./postLimit.sh 2500 → change post limit to 2500
# Must be executed in the directory Mastodons docker-compose.yaml is located
set -e
#include <Arduino.h>
#include <SoftwareSerial.h>
SoftwareSerial SRSerial(D1, D0);
void setup() {
Serial.begin(115200);
SRSerial.begin(9600);
}
esphome:
name: smlgw
friendly_name: smlgw
esp32:
board: esp32-c3-devkitm-1
# Enable logging
logger:
level: WARN