Skip to content

Instantly share code, notes, and snippets.

@Bouni
Bouni / git_fix_author_name.txt
Created May 12, 2023 11:36
change author af several commits back
1. git rebase -i <hash_of_last_good_commit>
2. change prefix to edit
3. git commit --amend --author="Bouni <bouni@owee.de>" --no-edit
4. git rebase --continue
Do steps 3 and 4 for every commit
@Bouni
Bouni / EP23XX-PDO.txt
Last active May 3, 2023 10:34
Beckhoff EP23XX PDOs
======================================EP2308======================================
====================================Input PDOs====================================
1 Name: Input Index: 0x6000 SubIndex: 1 BitLength: 1 Datatype: BOOL
2 Name: Input Index: 0x6010 SubIndex: 1 BitLength: 1 Datatype: BOOL
3 Name: Input Index: 0x6020 SubIndex: 1 BitLength: 1 Datatype: BOOL
4 Name: Input Index: 0x6030 SubIndex: 1 BitLength: 1 Datatype: BOOL
===================================Output PDOs====================================
1 Name: Output Index: 0x7040 SubIndex: 1 BitLength: 1 Datatype: BOOL
2 Name: Output Index: 0x7050 SubIndex: 1 BitLength: 1 Datatype: BOOL
@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 / Win10-Installed-Programs.ps1
Last active September 28, 2022 08:17
Get a list of installed programs on Windows 10
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.Publisher -notlike "Microsoft*" -and $_.Publisher -ne $Null} | Sort-Object -Property Publisher | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize
@Bouni
Bouni / topgrade.md
Created September 6, 2022 12:33
Setup Topgrade