Skip to content

Instantly share code, notes, and snippets.

View Bouni's full-sized avatar
🦥

bouni Bouni

🦥
View GitHub Profile
@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
@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")
@Bouni
Bouni / docker-compose.yaml
Created April 28, 2022 14:56
Gitea + Drone CI docker-compose setup, not production ready, just for testing
gitea:
image: gitea/gitea:1.16.4
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=giteadb:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
@Bouni
Bouni / flaskdrop.py
Last active March 31, 2022 11:37
A Flask based upload server, helps for example transfering files from mobile phone to PC
import os
import socket
from flask import Flask, render_template_string, request
from werkzeug.utils import secure_filename
app = Flask(__name__)
app.config["UPLOAD_FOLDER"] = "."