Skip to content

Instantly share code, notes, and snippets.

View kitsumed's full-sized avatar

Med kitsumed

View GitHub Profile
@kitsumed
kitsumed / menu.ps1
Last active October 19, 2025 00:42
Restic Backup Helper In Powershell
# PowerShell script for ImDisk and Restic setup (process-scoped TEMP/TMP for RAM DISK APPS) with menu. Quickly made with help of AI once I realised that on Windows restic actually write a lot of GB in %temp% to disk, causing wear on HDD/SSD.
# NOTE: With default restic config, around 400/500MB of RAM DISK should be enough, up to 1GB if there are issues.
<#
Copyright 2025 Kitsumed (Med)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@kitsumed
kitsumed / note.md
Last active April 26, 2025 04:44
Kitsumed notes on managing .gitconfig configurations & GPG

This gist is intended as notes for myself, feel free to read them, but it's not here as a tutorial or steps to follow.

Instructions on how to configure git so that it changes the global user commit informations along with the GPG key depending on the parent directory in which the "used git repo" is. (Steps for Windows) This also works when using the Github Desktop App.

Locate .gitconfig file at %userprofile% and add the following config.

# Force usage of GPG key by default globally
[commit]
	gpgSign = true
@kitsumed
kitsumed / PoC.py
Last active March 4, 2025 21:10
Crafting a WebM file that plays different tracks based on the device/software used to play it.
'''
Copyright 2025 kitsumed (Med)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE O