Concrete weighs 5 pounds per quart.
Continue readingWhen to play notes out of the Key
Another question from the Reddit Theory board. Here is my answer.
Continue readingAltered chords
When you start looking at Jazz lead sheets, you might notice a Chord with the Alt modification. This is an altered chord.
Continue readingDHCP Lease Design
The key piece of persisted data in an DHCP server is the lease. A lease is a the mapping between a MAC address and an IP address, limited in time. A Lease typically has a start time and an end time, but can be renewed. Because I am still living in an IPV4 world, I have to deal with arbitrarily small pools of IP addresses. Thus, the design needs to strike the balance between static and dynamic: a machine should generally get back the same IP address each time. However, if addresses get tight, address reuse should be aggressive.
Continue readingInterpreting DHCP packets
To capture DHCP packets I ran:
tcpdump port 67 -i vnet0 -vvvv -w /tmp/packets.bin
That gave me a binary file 940 bytes long. This is actually 2 packets: the request and the response. This has the IP header, the UDP header, and the DHCP packet payload in it.
Continue readinghexdump one byte decimal display
hexdump boot-packet.bin -e'"%07.8_ad " 8/1 "%03d " " " 8/1 "%03d " " |"' -e'16/1 "%_p" "|\n"' -v |
Extract Function Refactoring using inline functions.
The Extract Function refactoring is the starting point for much of my code clean up. Once a “Main” function gets sufficiently complicated, I pull pieces of it out into their own functions, often with an eye to making them methods of the involved classes.
While working with some rust code, I encountered an opportunity to execute this refactoring on some logging code. Here’s how I executed it.
Continue readingSwinging eighth notes via articulation
Someone asked (on Reddit) how to swing eighth notes. Here’s my response, somewhat cleaned up and expanded.
Don’t. If you try to swing them, they will be over done.
Play straight eighth notes. The “swing is done via articulation.
Podman login to a secured registry
I took the container registry I ran via podman and put it behind an Apache HTTPD instance secured with mod_ssl. Now when I try to log in to it, I get:
error authenticating creds for “nuzleaf.home.younglogic.net”: error pinging docker registry nuzleaf.home.younglogic.net: invalid status code from registry 403 (Forbidden)
Here’s my debugging notes.
Continue readingDealing with reused Serial Numbers for CAs
“An error occurred during a connection to nuzleaf.home.younglogic.net. You are attempting to import a cert with the same issuer/serial as an existing cert, but that is not the same cert.”
Many years ago I battled this problem and had different solutions. Today, I got one that worked for Firefox on Fedora 32.
Continue reading