View pretty-pyright
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python -u | |
import os | |
import re | |
import sys | |
import itertools | |
import contextlib | |
import subprocess | |
sys.stdout.reconfigure(line_buffering=True) |
View lights.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
light: | |
- platform: neopixelbus | |
type: GRB | |
variant: WS2812 | |
pin: GPIO1 | |
num_leds: 1 | |
name: "NeoPixel 1" | |
internal: true | |
- platform: neopixelbus | |
type: GRB |
View nzbking_filter.user.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |
View benchmark_attribute_access.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import enum | |
import math | |
import random | |
import timeit | |
import typing | |
import dataclasses | |
import collections | |
View decode_kubernetes_secrets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View add_to_nzbget.user.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 |
View mikrotik_dashboard.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"__inputs": [ | |
{ | |
"name": "DS_PROMETHEUS", | |
"label": "Prometheus", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "prometheus", | |
"pluginName": "Prometheus" | |
} |
View aida64_prometheus_exporter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import mmap | |
import typing | |
import hashlib | |
import logging | |
import argparse | |
import datetime | |
import ipaddress | |
import dataclasses | |
import xml.etree.cElementTree as ET |
View django_debug_toolbar_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder