This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem VIC-20 basic program to act as a tone | |
rem generator for morse code practice | |
rem author Mark Jenkins <mark@parit.ca> | |
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. | |
rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNIXPW_DISABLE_SSL=1 x11vnc -display :0 -forever -localhost -unixpw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 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) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://adventofcode.com/2022/day/1 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
EOFDEPTH = -1 | |
def read_depth_line(): | |
try: | |
line = input() | |
return int(line) | |
except EOFError: | |
return EOFDEPTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 172.23.177.54 and nmap helped me discover the GoPro was on 172.23.177.51. | |
I had to ask the GoPro to start streaming by visiting http://172.23.177.51/gp/gpWebcam/START?res=1080p | |
the result returned JSON with | |
{ | |
"status": 2, | |
"error": 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Monitor the FSF LibrePlanet icecast servers view counts and total bandwidth | |
# Copyright (C) 2022 Mark Jenkins <mark@markjenkins.ca> | |
# | |
# 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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Elected by acclamation | |
Edwin Amsler | |
Pietra Shirley | |
Thor Robinson | |
Michael Kozakewich |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<body> | |
<form method="GET" action="https://duckduckgo.com/"> | |
<select name="q" required> | |
<option value="" disabled selected>Pick an option</option> | |
<option value="duck">Duck</option> | |
<option value="duck">Cat</option> | |
<option value="duck">Bear</option> |
NewerOlder