Skip to content

Instantly share code, notes, and snippets.

@trisweb
trisweb / compose.openwakeword.yml
Created October 22, 2023 02:45
Home Assistant Docker Compose Configurations
# Wyoming OpenWakeWord
version: '3.3'
services:
wyoming-openwakeword:
restart: unless-stopped
volumes:
- './data:/data'
ports:
- '10400:10400'
image: rhasspy/wyoming-openwakeword
@barbudor
barbudor / minisyslog.py
Last active November 11, 2024 18:04
Dead simple syslog receiver and logger in Python
#! /usr/bin/env python
import socket
from datetime import datetime
UDP_IP = "0.0.0.0"
UDP_PORT = 5144
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
@probonopd
probonopd / Wayland.md
Last active May 20, 2025 05:38
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@elfmimi
elfmimi / gd32vf103.cfg
Last active May 18, 2023 22:56
OpenOCD script for GD32VF103 with improved reset procedure
# OpenOCD script for GD32VF103 with improved reset procedure
# Invoke it like this.
# for Digilent HS2
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "program binary.elf verify reset exit"
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "program binary.bin 0x08000000 verify reset exit"
# openocd -f interface/ftdi/digilent-hs2.cfg -c "ftdi_device_desc {Digilent USB Device}" -f gd32vf103.cfg -c "init; reset run; exit"
# for SiPEED USB-JTAG/TTL ( RV-Debugger )
# openocd -f interface/ftdi/minimodule.cfg -c "ftdi_device_desc {Dual RS232}" -f gd32vf103.cfg -c "init; reset run; exit"
# NAME=gd32vf103-blinker
# PREFIX=~/.platformio/packages/toolchain-gd32v/bin/riscv-nuclei-elf-
# LDSCRIPT=$(cygpath -ma ~/.platformio/packages/framework-gd32vf103-sdk/RISCV/env_Eclipse/GD32VF103xB.lds)
# ${PREFIX}as -march=rv32ic -o ${NAME}.o ${NAME}.S
# ${PREFIX}ld -T ${LDSCRIPT} -o ${NAME}.elf ${NAME}.o
# ${PREFIX}objcopy -O binary ${NAME}.elf ${NAME}.bin
.text
.global _start
_start:
https://unix.stackexchange.com/questions/125382/migrate-socat-init-script-to-systemd
For socat, I use a pure systemd approach. This is an example for a serial loopback:
[Unit]
Description=Socat Serial Loopback
#Before=my-other.service
[Service]
Type=simple