Skip to content

Instantly share code, notes, and snippets.

@Bouni
Bouni / diskspace-uptime.sh
Last active May 13, 2023 13:59
Use Uptime Kuma for disk space monitoring
#!/bin/bash
BASE_URL="https://uptime.bouni.de/api/push/"
disks=("/dev/sda1")
alerts=(85)
urls=("pCDwxLPOoI")
check () {
DISK=$1
<template>
<v-combobox v-model="country" :items="countries" item-title="name" item-value="code" label="Land" return-object>
<template v-slot:prepend-inner>
<span class="mr-2">
<country-flag :country='country.code.toLowerCase()' size='normal' v-if="country"/>
</span>
</template>
<template v-slot:item="{ item }">
<v-list-item>
<span class="mr-2">
@Bouni
Bouni / wxNaturalSortedListCtrl.py
Last active February 9, 2023 13:38
NaturalSortedListCtrl
"""ListCtrl with Natural sorting capability"""
import re
import wx
import wx.lib.mixins.listctrl as listmix
class NaturalSortedListCtrl(wx.ListCtrl, listmix.ColumnSorterMixin):
"""ListCtrl with Natural sorting capability"""
@Bouni
Bouni / convert.py
Last active December 29, 2022 12:00
Standalone JLCPCB parts catalog CSV to SQlite converter for use in kicad-jlcpcb-tools
import sys
import codecs
import contextlib
import csv
import os
import re
import sqlite3
import zipfile
from datetime import datetime as dt
@Bouni
Bouni / fints-spk-hrn.py
Created November 22, 2022 09:32
FinTS API Usage for Sparkasse Hochrhein
import datetime
import getpass
from fints.client import FinTS3PinTanClient, NeedTANResponse
from fints.hhd.flicker import terminal_flicker_unix
print("Please enter your login (same as online banking)")
login = input("Login: ").strip()
@Bouni
Bouni / bouni.omp.json
Created October 31, 2022 09:24
Customized Oh-My-Posh theme, based on M365Princess
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"git-foreground": "#193549",
"git": "#179299",
"git-modified": "#fe640b",
"git-diverged": "#e64553",
"git-ahead": "#7287fd",
"git-behind": "#7287fd"
},
@Bouni
Bouni / topgrade.md
Created September 6, 2022 12:33
Setup Topgrade
@Bouni
Bouni / program_list.py
Created June 22, 2022 06:12
Generate a list of all installed programs on MS Win 10, exclude MS programs, write to file
import datetime
import winreg
# Script from here: https://gist.github.com/psatler/010b26cd57e758278823d7027c40e2a6
# Slightly modified
dt = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
def foo(hive, flag):
import json
import os
import re
appdata = os.getenv("appdata")
basepath = os.path.join(appdata, "kicad", "6.99")
jsonpath = os.path.join(basepath, "kicad_common.json")
fplibpath = os.path.join(basepath, "fp-lib-table")