Skip to content

Instantly share code, notes, and snippets.

View jepler's full-sized avatar

Jeff Epler jepler

View GitHub Profile
;; todo: use 'wait gpio' (or 'wait jmp' [rp2350]) so any pair of pins
;; can be used
;wait 1 pin 1 ; wait for keyboard to signal ready (not necessary?)
.wrap_target
start:
jmp !osre send_byte ; if a byte is pending to send, do that
jmp pin start ; otherwise wait for keyboard to send something
; keyboard has signaled start condition
#!/usr/bin/python
import os
import datetime
import pytz
now = datetime.datetime.now(datetime.UTC)
sz = set()
for tz in pytz.all_timezones:
zone = pytz.timezone(tz)
import array
import rp2pio
import board
import adafruit_pioasm
import time
# MIT licensed https://github.com/No0ne/ps2pico/blob/main/LICENSE
# https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol
KBD_DATA = board.GP27
#!/usr/bin/env python
import subprocess
import pathlib
import click
def gross_lektor_parser(content):
parsed = {}
for c in content.split("\n---\n"):
if ':' in c:
font="FreeSans:style=Bold";
ww = 64;
hh = 30;
color("#d9d9d9")
linear_extrude(height=.4)
minkowski() {
square([ww, hh], center=true);
circle(d=4, $fn=24);
#include <gmpxx.h>
#include <charconv>
#include <string>
#include <iomanip>
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
for(int i=1; i<argc; i++) {
#include <gmpxx.h>
#include <charconv>
#include <string>
#include <iomanip>
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
for(int i=1; i<argc; i++) {
// ==UserScript==
// @name Fix category height
// @namespace http://tampermonkey.net/
// @version 2024-07-17
// @description try to take over the world!
// @author You
// @match https://blog.adafruit.com/wp/wp-admin/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=adafruit.com
// @grant none
// ==/UserScript==
extend-select = [
"D419", # empty-docstring
"E501", # line-too-long
"W291", # trailing-whitespace
"PLC0414", # useless-import-alias
"PLC2401", # non-ascii-name
"PLC2801", # unnecessary-dunder-call
"PLC3002", # unnecessary-direct-lambda-call
"E999", # syntax-error
"PLE0101", # return-in-init
extend-select = [
"D419", # empty-docstring
"E501", # line-too-long
"W291", # trailing-whitespace
"PLC0414", # useless-import-alias
"PLC2401", # non-ascii-name
"PLC2801", # unnecessary-dunder-call
"PLC3002", # unnecessary-direct-lambda-call
"E999", # syntax-error
"PLE0101", # return-in-init