Skip to content

Instantly share code, notes, and snippets.

const walk = (acc = [], outer) => {
if (typeof outer === null) {
return acc
}
if (typeof outer === 'string') {
if (outer === ' ') {
return acc
}
@jgusta
jgusta / tagfactory.js
Last active July 1, 2024 06:15
DOM Tag Factory
const tf = function (attachPoint) {
const root = globalThis || window
const dom = root.document || document
function selectEl(el) {
if (el.ELEMENT_NODE) {
return el
}
else {
return dom.querySelector(el)
@jgusta
jgusta / SiteSucker.js
Last active February 12, 2025 14:46
A Javascript for Automation (JXA) script for automating SiteSucker for Mac with opinionated defaults.
/**
CHANGELOG
2-10-25 - Ask about whether to use webviews.
*/
/**
* This script is a JavaScript for Automation (JXA) script that uses the SiteSucker app to download a website.
*
* Background: JXA is dogshit. I know there is no need to hold back on the cursing, because if you are using JXA,
* you have already explored every explitive available. The official JXA documentation is apple's changelog which
@jgusta
jgusta / INSTALL DOCKER CLI 2025.md
Last active October 13, 2025 02:05
Step by step command line instructions to install Docker Engine CE and CLI.

Install Docker Engine CE and CLI - June 2025

  • Instructions on installing a non-desktop version of docker is inconvenient to find in the official documentation.
  • I've collected the official steps for major platforms here for reference.

Ubuntu

Prerequisite: supported firewalls

  • only supports iptables-nft and iptables-legacy
@jgusta
jgusta / YD-RP2040-Pinout-Reverse.md
Last active October 13, 2025 02:19
YD-RP2040 pinout reverse side

YD-RP2040

Reverse Pinout

I like to solder the headers facing up. More convenient for putting in a case, but a bit irritating on a breadboard because the pinout diagrams dont match when it upside down. I needed to see a reverse diagram so I made one.

YD-RP2040

Original Diagram

image