Skip to content

Instantly share code, notes, and snippets.

@MathijsNL
MathijsNL / checkgpio.py
Created March 3, 2023 21:18
Streamlit app to check GPIO
import digitalio
import board
import time
import streamlit as st
# Define the list of all pin names
all_pin_names = [f"D{i}" for i in range(1, 41)]
# Initialize the GPIO pins for the switches
defined_pin_numbers = [3, 5, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 21, 22, 23, 24, 27, 28, 29, 31, 32, 33, 35, 37, 38, 40]
@MathijsNL
MathijsNL / DD_WRT_nvram_tricks.txt
Created December 22, 2022 08:28 — forked from Aikhjarto/DD_WRT_nvram_tricks.txt
DD-WRT nvram tricks
This file provides some nifty command-line tools around DD-WRT's nvram command.
https://www.dd-wrt.com/wiki/index.php/Hardware#NVRAM
USE WITH CAUTION: fiddling with nvram can wipe your settings and you may loose access to your router.
Hint 1: Different version of DD-WRT might use different nvram variables. Thus, be carefull when updating.
Hint 2: The commands listed below should be issued via a ssh-connection since the webinterface for issuing commands might time out for the longer commands.
Background
==========
Extracting the content of configuration variables with nvram would provide an easy way of selective backup/restore of settings. However, listing the content of the nvram via
nvram show
@MathijsNL
MathijsNL / load_dotenv.sh
Created April 4, 2022 23:30 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@MathijsNL
MathijsNL / 12to24.user.js
Last active April 1, 2022 19:07 — forked from Greenscreener/12to24.user.js
Convert all elements with 12-hour time to 24-hour automatically (for WhatsApp Web, but could be adapted easily)
// ==UserScript==
// @name WAWeb 24-hourifier
// @version 0.4
// @description Convert all elements with 12-hour time to 24-hour automatically (for WhatsApp Web, but could be adapted easily)
// @author Greenscreener
// @homepage https://grsc.cz/
// @match https://web.whatsapp.com/*
// @grant none
// @downloadURL https://gist.githubusercontent.com/Greenscreener/4422f5be36752bc720cbc7222fb73cdc/raw/12to24.user.js
// @updateURL https://gist.githubusercontent.com/Greenscreener/4422f5be36752bc720cbc7222fb73cdc/raw/12to24.user.js