Skip to content

Instantly share code, notes, and snippets.

View spatula75's full-sized avatar

Nicklas Johnson spatula75

View GitHub Profile
@spatula75
spatula75 / buzz.py
Created May 12, 2024 23:51
Hackish Python program to look for electrical utility powerline noise and chart it
import json
import urllib.request
from datetime import datetime, timedelta
from math import pow, log10, ceil
from pathlib import Path
from time import sleep
from zoneinfo import ZoneInfo
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
@spatula75
spatula75 / GPS-ntpd.md
Last active June 25, 2023 04:14
Setting up a GPS-based ntpd using a Raspberry Pi and the Adafruit Ultimate GPS Hat

The Problem

What sounded like a simple enough thing to want to do-- run ntpd on a Raspberry Pi that synchronizes with gps for use on my local LAN-- quickly turned into a nearly hopeless situation. Many guides existed online purporting to show how to do this; however, they universally failed to achieve results, either because they never actually worked, worked on some older version of Linux, or only worked by sheer luck for the author, and not for anybody else (maybe because they failed to document some critical steps).

Further, many of these guides were written by folks who don't really know what they're doing in Linux/Unix. They mean well,