Skip to content

Instantly share code, notes, and snippets.

View FabianBartl's full-sized avatar
🤖
studies robotics

Fabian FabianBartl

🤖
studies robotics
  • Germany
  • 05:39 (UTC +02:00)
View GitHub Profile
@FabianBartl
FabianBartl / kps.py
Last active March 9, 2025 14:24
A small cli script to quickly and easily get a shell for any pod of any kubernetes container. Written and tested for TrueNAS Scale Dragonfish 24.04
#!/usr/bin/env python3
"""
usage: kps.py [-h] [--search {contains,startswith,equals}] [-s {c,s,e}] [--show-commands] app_name
A small cli script to quickly and easily get a shell for any pod of any kubernetes container.
Written and tested for TrueNAS Scale Dragonfish 24.04
positional arguments:
app_name name of the kubernetes container
@FabianBartl
FabianBartl / uniquemail.py
Last active February 28, 2025 14:28
Extracts every unique email from multiple text files and copies the result into your clipboard. So (at least on windows) you can just drag-n-drop any amount of txt-files onto the python script in your file explorer, it opens a terminal, prints the emails and puts them into your clipboard.
"""
Extracts every unique email from multiple text files and copies the result into your clipboard.
So (at least on windows) you can just drag-n-drop any amount of txt-files onto the python script
in your file explorer, it opens a terminal, prints the emails and puts them into your clipboard.
"""
import sys
import os
import re
@FabianBartl
FabianBartl / verify-file-gpg-signature.py
Last active February 18, 2025 20:53
Simple Python script to verify a given GPG signature of a file. The signature can be provided as a local file or an url, where the script can download it.
"""
Simple Python script to verify a given GPG signature of a file.
The signature can be provided as a local file or an url, where the script can download it.
Example Usage:
`verify-file-gpg-signature.py --keyserver keyserver.ubuntu.com --sig_file OpenVPN-2.6.13-I001-amd64.msi.asc OpenVPN-2.6.13-I001-amd64.msi`
`verify-file-gpg-signature.py --sig_url https://swupdate.openvpn.net/community/releases/OpenVPN-2.6.13-I001-amd64.msi.asc OpenVPN-2.6.13-I001-amd64.msi`
"""
@FabianBartl
FabianBartl / create-chapters.py
Last active May 3, 2025 22:43 — forked from cliss/mergechapters.py
Create chapters from text file by modifying ffmetadata. Merge videos with chapters while keeping all audio and subtitle tracks. Find more usefull scripts here: https://github.com/FabianBartl/jellyfin-scripts
# Create chapters from text file by modifying ffmetadata
# https://ikyle.me/blog/2020/add-mp4-chapters-ffmpeg
import re, sys
if len(sys.argv) < 2:
print(f"Usage: {__file__} [chapters file]")
exit()
chapters = list()
@FabianBartl
FabianBartl / .md
Last active February 7, 2024 16:49
Regular expression to remove blank lines and single line comments in C/C++ files.
  • remove blank lines with ^\s*$\n
  • remove single line comments with *//.*$\n
  • remove inline comments with /\*.*\*/
  • replace tabs with \t by a single space
  • replace multiple spaces with + by a single space

all in one:

  • replace all above with (^\s*$\n)|( *//.*$\n)|(/\*.*\*/)|(\t) by spaces
  • reduce all the spaces with + to a single space
@FabianBartl
FabianBartl / inset-crop.py
Created February 7, 2024 11:15
A script to resize an image of any size while keeping the original aspect ratio.
# A script to resize an image of any size while keeping the original aspect ratio.
# To keep the output size and the aspect ratio, the free space next to the image
# is filled with a given RGBA color.
from PIL import Image
import sys
import re
@FabianBartl
FabianBartl / mouse-emulator.ahk
Last active April 8, 2023 15:44
An AHK script to emulate mouse movements and clicks with key combinations.
; Mouse Emulator
; An AHK script to emulate mouse movements and clicks with key combinations.
; # Win
; ^ Control
; ! Alt
; + Shift
; Right click
#LButton::RButton
@FabianBartl
FabianBartl / README.md
Last active July 5, 2022 11:14
RTO Tool

RTO Tool

The "Render Time Overview Tool" is a small program that calculates from the number of frames and the render time per frame how long the rendering will take. The result is a duration in hours, as well as the calculated date of completion. If a part has already been rendered, this can also be specified.