Skip to content

Instantly share code, notes, and snippets.

@DeflateAwning
DeflateAwning / Startpage_Search_Upgrades.user.js
Last active February 16, 2026 22:38
Hide ads on Startpage search results page and set title tag better
// ==UserScript==
// @name Startpage Search Upgrades
// @namespace https://gist.github.com/DeflateAwning/9b6e3b4ffbf06c70a4b68a6483c8a70f
// @version 0.3.1
// @description Hide ads on Startpage search results page and set title tag better
// @author DeflateAwning
// @include https://startpage.com/*
// @include https://*.startpage.com/*
// @run-at document-idle
// @grant GM_addStyle

Guide for Auditing a Python Repo

  1. pytest, ruff, pyright
  2. skylos for dead code checking
  3. uv-secure for dependency auditing
@DeflateAwning
DeflateAwning / Helium-E5-DHT22.cpp
Created December 20, 2025 00:14 — forked from NorHairil/Helium-E5-DHT22
Code for Grove E5 sending data to Helium console
#include <Arduino.h>
#include <U8x8lib.h>
#include "DHT.h"
#define DHTPIN 0 // what pin we're connected to
// Uncomment whatever type you're using!
// #define DHTTYPE DHT11 // DHT 11
#define DHTTYPE DHT22 // DHT 22 (AM2302)
//#define DHTTYPE DHT21 // DHT 21 (AM2301)

Debugging Browser Locale Issues

Helpful JS Validations

// Diagnose
Intl.DateTimeFormat().resolvedOptions() // Lists the locale used to format dates.
new Date().toLocaleString() // Main date format things are returned as.

// These are normally correct. They show what languages are requested.
@DeflateAwning
DeflateAwning / Lily58_Build_Notes.md
Last active April 15, 2026 00:41
Build notes for my Lily58 keyboard

Lily58 Build Notes

Firmware

Quick Reference: Firmware Updates

git clone https://github.com/DeflateAwning/qmk_firmware
cd qmk_firmware
git checkout develop-lily58
@DeflateAwning
DeflateAwning / np_columns_to_polars_benchmark.py
Created March 25, 2025 21:05
Benchmark the conversion of Numpy to Polars vs. Numpy to Pandas to Polars
"""
Related to https://github.com/pydata/xarray/issues/10135
Result (in VS Code debugger):
Shape | NumPyPolars | NumPyPandasPolars
-----------------------------------------------------------------
10,000 x 10 | 0.003997 s | 0.033097 s
10,000 x 200 | 0.002424 s | 0.050915 s
100,000 x 10 | 0.000278 s | 0.021541 s
@DeflateAwning
DeflateAwning / np_to_polars_memory.py
Last active March 25, 2025 20:56
Benchmark Numpy to Polars
import numpy as np
import pandas as pd
import polars as pl
import time
from memory_profiler import memory_usage
# Array shapes to test
shapes = [
(10_000, 10),
(10_000, 200),
@DeflateAwning
DeflateAwning / Agilent_DSOX3012A_Scope_Repair.md
Last active December 12, 2024 05:21
Repair Agilent DSO-X 3012A Oscilloscope (Busted Power Supply)
@DeflateAwning
DeflateAwning / RP2040-Zero with MicroPython Setup Guide.md
Last active March 17, 2026 23:26
RP2040-Zero with MicroPython Setup Guide

RP2040-Zero with MicroPython Setup Guide

Initial Setup (Do Once)

  1. Install VS Code.
  2. In VS Code, install the "MicroPico" extension.
  3. Download the MicroPython firmware from: https://micropython.org/download/RPI_PICO/RPI_PICO-latest.uf2
  4. Connect the RP2040-Zero to the computer. If a USB Drive doesn't appear, press: reset-down, boot-down, reset-up, boot-up.
  5. Open the USB Drive that appeared. Copy on the MicroPython uf2 file. Wait 30 seconds.
  6. Optional: Run pip install micropython-rp2-rpi_pico-stubs to install Python type checking helpers.
  • This install the type hints required for the import machine package.
@DeflateAwning
DeflateAwning / PCB_Ordering_Checklist.md
Last active April 12, 2026 05:14
A KiCAD (or generic) PCB ordering checklist

PCB Ordering Checklist

Check list is tailored for KiCAD, but applies to any software.

Main Checklist

  1. Pages are "US Letter" if printing in Canada/US
  2. Are footprints and symbols stored in the git repo correctly? Project library, with relative path links.
  3. Print PCB on paper to check footprints
  4. Check STM32 pin assignments with STM32CubeIDE, if applicable.
  5. Revision and date?