Skip to content

Instantly share code, notes, and snippets.

View barbudor's full-sized avatar

Barbudor barbudor

  • France, Paris south suburbs
View GitHub Profile
@barbudor
barbudor / new_parser.be
Last active June 16, 2023 21:12
tasmota.add_rule() to support map argument
class Rule_Matcher2
# We don't actually need a superclass, just implementing `match(val)`
#
# static class Rule_Matcher
# def init()
# end
# # return the next index in tha val string
# # or `nil` if no match
@barbudor
barbudor / minisyslog.py
Created May 27, 2022 06:36
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 = 5140
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))