Skip to content

Instantly share code, notes, and snippets.

roger- /
Created Dec 24, 2020
Redirect messages from one MQTT server to another
import sys
import time
import re
import paho.mqtt.client as mqtt
regex_address = re.compile(r'(?:(?P<username>.+):(?P<password>.+)@)?(?P<address>[\w.]+)(?::(?P<port>[0-9]+))?')
def on_message(client_src, userdata, message):
client_dest, topic_root = userdata
View v4lenc.c
* Copyright (c) 2013 Clément Bœsch
* This file is part of FFmpeg.
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
roger- / main.cpp
Last active Aug 10, 2017
Part of RTSP server
View main.cpp
/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
** main.cpp
** V4L2 RTSP streamer
** H264 capture using middleware_video
roger- /
Created Dec 3, 2012
1D array library test (for Pythonista)
from __future__ import division
import numbers
import operator
import math
class array(list):
def __getitem__(self, y):
if isinstance(y, (numbers.Integral, slice)):
return list.__getitem__(self, y)