Skip to content

Instantly share code, notes, and snippets.

markjenkins /
Created June 7, 2024 01:57
morse code play tools
opusenc $1 `basename -s .wav $1`.opus
markjenkins / tone1.bas
Last active January 12, 2024 04:28
A VIC20 BASIC tone generator using the user port for morse code practice
rem VIC-20 basic program to act as a tone
rem generator for morse code practice
rem author Mark Jenkins <>
rem checks portB pin 0 e.g. pin "C"
rem hardware connected to user-port
rem should short that pin to ground when a
rem switch is closed.
markjenkins / x11vnc_notes.txt
Created October 15, 2023 16:41
invoking x11vnc with unix auth, localhost binding and no ssl requirements
UNIXPW_DISABLE_SSL=1 x11vnc -display :0 -forever -localhost -unixpw
markjenkins /
Created October 13, 2023 08:28
IQ511 record mjpeg avi to cronolog
# for IQ511
# $1 is the last octet of the ipv4 address
# created files are not cleaned up
# regarding /now.jpg urls
# snap=spush0.25 means camera push a frame every 0.25 seconds
# ds=2 downsample by a factor of 2 (half size)
#!/usr/bin/env python3
# Parts 1 and 2 with constant memory
# Mark Jenkins
from heapq import nlargest
def gen_elf_lines():
"""a generator of consecutive elf lines, converted to int
markjenkins /
Last active December 10, 2022 08:47
Advent of code 2021 in Python and Guile Scheme
#!/usr/bin/env python3
def read_depth_line():
line = input()
return int(line)
except EOFError:
While connected to a PC without drivers (such as GNU/Linux) over USB, the GoPro sets itself up as a USB Ethernet card and runs a DHCP server to assign your PC an address. Doesn't mess with my default route, so regular path to the internet still works. In my case the GoPro assigned me and nmap helped me discover the GoPro was on
I had to ask the GoPro to start streaming by visiting
the result returned JSON with
"status": 2,
"error": 0
markjenkins /
Last active March 20, 2022 18:15
Monitor the FSF LibrePlanet icecast servers view counts and total bandwidth
#!/usr/bin/env python3
# Monitor the FSF LibrePlanet icecast servers view counts and total bandwidth
# Copyright (C) 2022 Mark Jenkins <>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
markjenkins / 2022-02-22_boardcandidates.txt
Last active February 23, 2022 00:46
Skullspace Board Election 2022
Elected by acclamation
Edwin Amsler
Pietra Shirley
Thor Robinson
Michael Kozakewich
markjenkins /
Created October 26, 2021 19:37
Get N random lines from a file
#!/usr/bin/env python3
# call with two arguments, the path to the file to read lines from and
# the number of lines
from sys import argv
from random import SystemRandom
with open(argv[1]) as f:
lines = f.readlines()