Skip to content

Instantly share code, notes, and snippets.

View wolph's full-sized avatar

Rick van Hattem wolph

View GitHub Profile
// ==UserScript==
// @name nzbking size and extension filtering
// @namespace http://wol.ph/
// @version 0.1
// @description Automatically hides downloads that are too small or only contain extensions such as exe, jpg, nfo, etc...
// @author wolph
// @match https://www.nzbking.com/*
// @icon https://icons.duckduckgo.com/ip2/nzbking.com.ico
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js
// @grant none
@wolph
wolph / benchmark_attribute_access.py
Last active April 10, 2025 09:15
Benchmark namedtuple vs dataclass vs dict
import sys
import enum
import math
import random
import timeit
import typing
import dataclasses
import collections
@wolph
wolph / google-cookie-consent.user.js
Last active June 7, 2025 17:12
Google Cookie Consent Remover
#!/usr/bin/env python3
'''
A very simple kubernetes secrets dump tool. You can use it like this:
# kubectl get secret -o yaml -A | python decode_secrets.py
'''
import sys
import yaml
import base64
@wolph
wolph / add_to_nzbget.user.js
Created February 25, 2020 19:52
Add nzbindex results to nzbget server
// ==UserScript==
// @name add-to-nzbget
// @namespace http://wol.ph
// @version 0.1
// @description Add nzbs to nzbget
// @author You
// @match https://www.nzbindex.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @grant GM_addStyle
// @grant GM_unsafeWindow
@wolph
wolph / mikrotik_dashboard.json
Created December 12, 2019 18:18
mikrotik exporter prometheus dashboard
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@wolph
wolph / aida64_prometheus_exporter.py
Last active May 29, 2024 07:54
This prometheus exports all of your AIDA64 data to a Prometheus server so you can chart all of them using Grafana: https://grafana.com/grafana/dashboards/11339
import re
import mmap
import typing
import hashlib
import logging
import argparse
import datetime
import ipaddress
import dataclasses
import xml.etree.cElementTree as ET
DEBUG_TOOLBAR = DEBUG
if DEBUG_TOOLBAR:
def show_toolbar(request):
if request.user.is_superuser:
return True
elif request.META['REMOTE_ADDR'] in INTERNAL_IPS:
return True
return False
esphome:
name: plant_moisture
platform: ESP32
board: esp32dev
wifi:
ssid: "spam"
password: "eggs"
# Enable logging