Skip to content

Instantly share code, notes, and snippets.

View treideme's full-sized avatar

Thomas Reidemeister treideme

View GitHub Profile
@treideme
treideme / ntp.conf
Created November 21, 2023 18:18
Network Time Protocol (NTP) Server configuration for using the local clock as authoritative source and providing NTP time to LLA clients
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Leap seconds definition provided by tzdata
leapfile /usr/share/zoneinfo/leap-seconds.list
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
@treideme
treideme / ntp.conf
Last active November 21, 2023 18:15
Network Time Protocol (NTP) Server Configuration that provides a time-base for LLA clients and synchronized to Japans NTP pool over an internet connection
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Leap seconds definition provided by tzdata
leapfile /usr/share/zoneinfo/leap-seconds.list
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
@treideme
treideme / brightness_histogram.py
Created November 14, 2023 18:15
Display the brightness distribution from input images
"""
Simple script to check the brightness distribution from images.
Ensure you have opencv and matplotlib installed, via
pip install opencv-python matplotlib
"""
__author__ = "Thomas Reidemeister <thomas@labforge.ca>"
import sys
@treideme
treideme / distortion_demo.py
Created October 25, 2023 22:34
Highlight distortion parameter impact in image plane projection
# This gists highlights the impact of various distortion parameters
import numpy as np
import cv2
# Set camera calibration parameters
fx = 8262.158089604814
fy = 8241.805993224913
cx = 2147.360664332489
cy = 897.9466061409038
k1 = -0.33193540220291506
@treideme
treideme / wifi_reset.ino
Created July 4, 2022 11:54
ESP8266 Automatic Modem Wifi Reset
/**
* Simple sketch to reset your cable modem if the internet connection dies
* (C) 2022 Thomas Reidemeister
* Tested on ESP8266 NodeMCU board
*
* [GPIO]->[transistor-driven 5V Relay]->[Cable Modem power cable]
*/
#include <Pinger.h>
#include <ESP8266WiFi.h>
extern "C"