Skip to content

Instantly share code, notes, and snippets.

View njh's full-sized avatar

Nicholas Humfrey njh

View GitHub Profile
@njh
njh / 20220826174908622.xml
Created August 27, 2022 19:29
DAB EPG File for BBC Radio 4 on Sunday 28th August 2022
<epg>
<defaultContentIDElement contentID="0.E1.CE15.C224.">
</defaultContentIDElement>
<schedule version="5">
<programme shortId="794099">
<mediumName>
Midnight News
</mediumName>
<longName>
Midnight News - 28/08/2022
@njh
njh / PyQt5-5.14.2.log
Created December 31, 2021 10:37
Building PyQt5 v5.14.2 on Raspberry Pi OS (Debian 11.2)
This file has been truncated, but you can view the full file.
pi@raspberrypi:~/tasmotizer $ pip3 install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pyserial>=3.5 in /home/pi/.local/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (3.5)
Collecting PyQt5==5.14.2
Downloading PyQt5-5.14.2.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 1.5 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
@njh
njh / FlashStringTest.ino
Last active September 7, 2021 12:20
Experimental sketch, testing storing a MAC address in program memory and casting to __FlashStringHelper
// Experimental sketch, testing storing a MAC address in program memory and casting to __FlashStringHelper
// By Nicholas Humfrey
// This Macro isn't available for AVR architecture in the Arduino IDE
#ifndef FPSTR
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
#endif
const static byte mymac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 };
const static byte myprogmac[] PROGMEM = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 };
@njh
njh / combined.xsd
Created May 27, 2021 15:37
Validate an RadioDNS (ETSI TS 102 818) SI.xml file offline using xmllint
<?xml version="1.0" encoding="UTF-8"?>
<schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<import namespace="http://www.worlddab.org/schemas/spi/33" schemaLocation="spi_33.xsd"/>
</schema>
@njh
njh / gist:437713988b108880a8fe23ed10168c0c
Created February 15, 2021 00:15
Test 0001-pppd-Allow-for-a-zero-interface-identifier-in-ConfRe.patch
./pppd/pppd file ~/ppp-options ipv6 ::, ipv6cp-accept-local /dev/ttyAMA0 115200
using channel 115
Using interface ppp0
Connect: ppp0 <--> /dev/ttyAMA0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x278163d5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x278163d5>]
rcvd [LCP ConfReq id=0x3d <asyncmap 0x0> <magic 0xef10eb70>]
sent [LCP ConfAck id=0x3d <asyncmap 0x0> <magic 0xef10eb70>]
sent [LCP EchoReq id=0x0 magic=0x278163d5]
sent [IPV6CP ConfReq id=0x1 <addr fe80::0000:0000:0000:0000>]
@njh
njh / ppp-options-mini
Last active February 15, 2021 23:50
Attempting to get 'server' pppd to give IPv6 interface identifier to 'client' pppd - version 2.4.7
nodetach
noauth
debug
persist
local
noip
+ipv6
@njh
njh / vddl-status-2021-01-12.txt
Created February 8, 2021 21:33
Output of `vdsl status` on Draytek Vigor 130
---------------------- ATU-R Info (hw: annex A, f/w: annex A/B/C) -----------
Running Mode : 17A State : SHOWTIME
DS Actual Rate : 32397000 bps US Actual Rate : 17000000 bps
DS Attainable Rate : 41041052 bps US Attainable Rate : 21214000 bps
DS Path Mode : Fast US Path Mode : Fast
DS Interleave Depth : 1 US Interleave Depth : 1
NE Current Attenuation : 11 dB Cur SNR Margin : 12 dB
DS actual PSD : 0. 6 dB US actual PSD : 12. 5 dB
NE CRC Count : 0 FE CRC Count : 63281
NE ES Count : 0 FE ES Count : 7557
@njh
njh / xml_parser_test.php
Created October 11, 2020 18:05
A PHP script to compare \EasyRdf\XMLParser with 'XML Parser' (expat)
<?php
require_once realpath(__DIR__)."/vendor/autoload.php";
$xml = <<<'EOD'
<root>
<one a="1" b="2">one</one>
<two a="1" b="2">two</two>
<three />
</root>
@njh
njh / gist:ef9f36ffe9b67131023619da7da5230b
Created July 6, 2020 09:01
curl request for jsonldcontext.json
$ curl -v https://schema.org/docs/jsonldcontext.json
* Trying 2a00:1450:4009:80f::200e...
* TCP_NODELAY set
* Connected to schema.org (2a00:1450:4009:80f::200e) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
@njh
njh / uk-ofcom-tv-transmitting-stations.csv
Last active April 15, 2020 19:36
A list of UK TV Transmitter Stations from Ofcom - Version 19 (6th June 2019)
Station Name Grid Reference UHF Channel Aerial Height Power Comments
BORDERS
CALDBECK NY29954259 25 619.5 100000
Ainstable NY53914661 39 234.8 20
Bassenthwaite NY20633054 39 142 100
Bleach Green HP NX98431990 39 151 2
Bleach Green VP NX98431990 39 151 20
Crosby Ravensworth NY61881525 60 227 2