Skip to content

Instantly share code, notes, and snippets.

View darconeous's full-sized avatar
🦀

Robert Quattlebaum darconeous

🦀
View GitHub Profile
@darconeous
darconeous / gecoloreffects.py
Last active October 25, 2023 19:34
PIO-based GE-ColorEffects G35 driver for MicroPython on RP2
# PIO-based GE-ColorEffects driver for MicroPython on RP2
# MIT license; Copyright (c) 2023 Robert Quattlebaum
import array, time
from machine import Pin
import rp2
import machine
# Pin 15 is the default on the [pimoroni plasma stick][1].
#
@darconeous
darconeous / self-signed-cert.conf
Last active August 9, 2023 20:34
OpenSSL self-signed certificate config
# Use like:
#
# ```
# openssl req -x509 -nodes \
# -days 3650 \
# -newkey rsa:2048 \
# -keyout /etc/ssl/private/host.key.pem \
# -out /etc/ssl/certs/host.crt.pem \
# -config self-signed-cert.cfg
# ```
@darconeous
darconeous / gist:c87cb13e35d92f442de6c5d8603698cf
Created May 10, 2023 19:54
converting tab-delimited to pipe-delimited
pbpaste | tr '\t' '|' | sed 's/\(.*\)/|\1|/' | pbcopy
@darconeous
darconeous / 3d-printing-trimmer-line.md
Last active September 14, 2023 01:03
3D Printing with Nylon Trimmer Line

3D Printing with Nylon Trimmer Line

Disclaimer

All of this information is provided AS IS, with no warranty or guarantee of accuracy. A good-faith effort has been made to ensure this document was accurate at the time it was written, but YOU ASSUME ALL RISK BY FOLLOWING ANY ADVICE BELOW.

Introduction

Nylon is a strong and impact-resistant thermoplastic that is used

@darconeous
darconeous / chamfer.scad
Last active December 14, 2022 21:57
Chamfering OpenSCAD Example
/// Chamfering OpenSCAD Example
/// Written by Robert Quattlebaum, 2022-12-14
///
/// This example shows a method for adding a chamfer to a certain
/// class of 3D objects where the profile in the Z dimension doesn't
/// change significantly.
///
/// You must specify the size of the chamfer, the height of the child
/// and the Z-offset for the bottom of the object. You can also specify
/// the shape of the chamfer, which can be either "cone", "curve", "curve-in",
@darconeous
darconeous / tcprepl.py
Created September 21, 2022 00:23
Micropython TCP/telnet REPL
# REPL Prompt over TCP socket.
# Use `$ telnet <ip-addr>` to connect.
import network
import os
import socket
import sys
listen_s = None
client_s = None
@darconeous
darconeous / fm-discriminator.md
Last active April 20, 2023 20:34
Extracting the fundamental frequency from a time-domain signal

Extracting the fundamental frequency from a time-domain signal

"Extracting the fundamental frequency from a time-domain signal" is basically a long-winded way of saying "demodulating the baseband signal from FM-encoded signal". Well, that's still long winded, but I digress.

In an FM radio, the contraption that accomplishes this task is referred to as a "discriminator". So the task here is to implement a software-based frequency discriminator. There are a few different ways

@darconeous
darconeous / rect-starlink-cable-hack.md
Last active March 2, 2024 20:37
Hacking the Rectangular Starlink Dishy Cable
@darconeous
darconeous / quick_install.sh
Created March 17, 2020 21:46
Installer script for ledger-u2f-javacard
#!/bin/sh
GP=${GP-java -jar gp.jar}
set -v
set -e
# This is for the ACR122U to put it into
# a nice state where it won't time out on us.
$GP -d -v -a ff0041ff00 -a ff00520000 || true
@darconeous
darconeous / Curve25519-Curve448-Terminology.md
Last active February 9, 2020 00:41
Curve25519/Curve448 Terminology

Curve25519/Curve448 Terminology

Curve25519: A well-known Montgomery curve designed for ECC at a 128-bit security level.

X25519: The name of the scalar-point multiplication function for points on Curve25519 when performing ECDH. It is also commonly used as a shorthand for ECDH-using-Curve25519.

EdDSA: