Skip to content

Instantly share code, notes, and snippets.

micw / LinageOS on Samsgung Galaxy S5e from
Last active April 15, 2024 10:12
LinageOS on Samsgung Galaxy S5e WiFi from scratch from Linux with heimdall
micw /
Last active January 23, 2024 16:59
Python script to replace ${PLACEHOLDER} in config files with content from environment variables
#!/usr/bin/env python
# Replaces ${placeholder} in a config file by it's corresponding environment variable.
# Fails if a variable is missing.
# The latest version of this script can be found at
import argparse,re
from os import environ
micw /
Last active August 11, 2023 06:14
Script to install one or more jenkins plugins including dependencies while jenkins is offline
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
micw /
Created February 6, 2020 19:24
Getting camera images from esp32cam with esphome and python
#!/usr/bin/env python3
import aioesphomeapi
import asyncio
async def main():
loop = asyncio.get_running_loop()
cli = aioesphomeapi.APIClient(loop, "HOST-OR-IP", 6053, "API-PASSWORD-OR_EMPTY")
await cli.connect(login=True)
micw / w132.ino
Last active January 4, 2022 16:58
Ventus W132 decoder sketch
* Ein ESP8622 NodeMCU Develompent Board, welches Sensorwerte via MQTT verschickt
* Umbau eines W132 Windsensors von ELV
* - Abtrennen des 433 MHZ-Senders, welcher mit 3 Leitungen (Schwarz, Rot, Blau) an der Logik-Platine angeschlossen ist
* - Anschließen des ESP-8266
* - Schwarz -> GND
* - Rot -> 3.3V
  • Ensure that mailu runs on mysql as DB for easier SQL migrations
  • Create temporary tables with the correct structure for mailu (remove where filter like domain_id=4 or email like "" to dump all domains)
CREATE TABLE mailu_domain
    cast(now() as date) as created_at,
    null as updated_at,
    'ispconfig_import' as comment,
    domain as name,
Setting up pacman
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/etc/pacman.d/gnupg/secring.gpg' to gpg-agent
gpg: migration succeeded
gpg: Generating pacman keyring master key...
gpg: key 23A3588614ECF09B marked as ultimately trusted
gpg: directory '/etc/pacman.d/gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/etc/pacman.d/gnupg/openpgp-revocs.d/EF87C38EA3C6A657AF54A36323A3588614ECF09B.rev'
name: badlichttest
platform: ESP8266
board: d1_mini
ssid: "wiot"
password: "****"
micw / create docker network
Last active July 3, 2019 05:26
Setup macvlan device to use with docker
docker network create --driver=macvlan --subnet= --gateway -o parent=eno1 -o macvlan_mode=bridge macvlan0