Skip to content

Instantly share code, notes, and snippets.

@heyjoeway
heyjoeway / PrivacyScriptSplit.py
Created December 28, 2023 20:57
For https://privacy.sexy/: Split privacy-script.bat into individual batch scripts
# https://stackoverflow.com/a/7406369
def make_filename_safe(filename):
keepcharacters = (' ','.','_')
return "".join(c for c in filename if c.isalnum() or c in keepcharacters).rstrip()
def split_privacy_script(path):
def new_item():
return {
"title": "",
"contents": ""
# Automates KB5028997
# https://support.microsoft.com/en-us/topic/kb5028997-instructions-to-manually-resize-your-partition-to-install-the-winre-update-400faa27-9343-461c-ada9-24c8229763bf
# WARNING: THIS SCRIPT WILL CHANGE YOUR PARTITION LAYOUT. USE AT YOUR OWN RISK.
# NOT RESPONSIBLE FOR ANY DATA LOSS.
function KB5028997 {
$TargetSize = 750MB
$ReagentC = reagentc /info