Skip to content

Instantly share code, notes, and snippets.

View MaxwellDPS's full-sized avatar
🥔
P. O. T. A. T. O.

Max Watermolen MaxwellDPS

🥔
P. O. T. A. T. O.
View GitHub Profile
@MaxwellDPS
MaxwellDPS / Dockerfile
Last active September 17, 2025 19:14
token_thefter_3000, duh
FROM python:3.11-slim
# Install dependencies
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python packages
RUN pip install --no-cache-dir \
Flask==3.0.0 \
@MaxwellDPS
MaxwellDPS / README.md
Last active August 31, 2025 18:34
WSL Yubikey attach helper

YubiKey WSL Management - Usage Guide

Quick Start

Basic Operations

# Attach first YubiKey found (most common use case)
.\Connect-YubiKeyToWSL.ps1
@MaxwellDPS
MaxwellDPS / wx.sh
Created March 29, 2025 03:10
Bash is the scenic route
#!/bin/bash
VT1="AF,Ashfall
AS,Air Stagnation
AV,Avalanche
BH,Beach Hazard
BS,Blowing Snow
BW,Brisk Wind
BZ,Blizzard
CF,Coastal Flood
@MaxwellDPS
MaxwellDPS / guide.md
Created January 1, 2025 21:21 — forked from Kranzes/guide.md
SSH Resident Key Guide

Initial checks

Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:

nix shell nixpkgs#yubikey-manager -c ykman fido credentials list

If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.

Evaluating additional authentication factors

Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:

@MaxwellDPS
MaxwellDPS / Belgian Waffles.md
Last active November 12, 2024 19:06
Belgian Waffles

Ingredents

  • 2 cups Sugar
  • 1 2/3 cup shortening
  • 1 1/2 cup milk
  • 4 eggs
  • 2 1/2 tsp baking powder
  • 1 tsp vanilla
  • 1 1/2 tsp salt
  • ~4 cups flower
@MaxwellDPS
MaxwellDPS / ANSI.md
Created May 14, 2024 17:06 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
ZWNobzsgZWNobyAncGVybWFuZW50IGtleXMgYW5kIHBhc3Nvd3JkIHByb3RlY3RlZCBrZXlzIGFyZSA0IGxvb3NlcnMg8J+YjicgfCBjb3dzYXkgLVQgNjk7IGNhdCA8PCBFT0YKCuKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVl+KWiOKWiOKVlyAg4paI4paI4pWX4paI4paI4paI4paI4paI4paI4paI4pWXICAgICDilojilojilojilojilojilojilZcg4paI4paI4paI4paI4paI4paI4pWXIOKWiOKWiOKVlyAgICDilojilojilZcgICAg4paI4paI4pWXICDilojilojilZcg4paI4paI4paI4paI4paI4pWXIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlyAgICDilojilojilojilojilojilojilojilZfilojilojilojilojilojilojilZcgIOKWiOKWiOKWiOKWiOKWiOKWiOKVlyDilojilojilZcgIOKWiOKWiOKVl+KWiOKWiOKWiOKWiOKWiOKWiOKWiOKVl+KWiOKWiOKWiOKVlyAgIOKWiOKWiOKVl+KWiOKWiOKVlwrilZrilZDilZDilojilojilZTilZDilZDilZ3ilojilojilZEgIOKWiOKWiOKVkeKWiOKWiOKVlOKVkOKVkOKVkOKVkOKVnSAgICDilojilojilZTilZDilZDilZDilZDilZ3ilojilojilZTilZDilZDilZDilojilojilZfilojilojilZEgICAg4paI4paI4pWRICAgIOKWiOKWiOKVkSAg4paI4paI4pWR4paI4paI4pWU4pWQ4pWQ4paI4paI4pWX4paI4paI4pWU4pWQ4pWQ4pWQ4pWQ4pWdICAgIOKWiOKWiOKVlOKVkOKVkOKVkOKVkOKVneKWiOKWiOKVlOKVkOKVkOKWiOKWiOKVl+KWiOKWiOKVlOKVkOKVkOKVkOKWiOKWiOKVl+KWiOKW
@MaxwellDPS
MaxwellDPS / scrape.js
Created March 19, 2023 16:38 — forked from chriswhong/scrape.js
Decrypting Amtrak's real-time train location geoJSON feed
// decrypting Amtrak's real-time train location geoJSON feed
// based on https://github.com/Vivalize/Amtrak-Train-Stats
const fetch = require('node-fetch');
const CryptoJS = require('crypto-js');
// this is the xhr call done by https://www.amtrak.com/track-your-train.html containing encrypted train location data
const dataUrl = 'https://maps.amtrak.com/services/MapDataService/trains/getTrainsData';
// these constants are pulled from RoutesList.v.json, which is an object with keys 'arr', 's', and 'v'
const sValue = '9a3686ac'; // found at s[8]
#!/usr/bin/env python3
import asyncio
import json
import logging
import os
import yaml
from datetime import datetime