Skip to content

Instantly share code, notes, and snippets.

View Daggerpov's full-sized avatar

Daniel Agapov Daggerpov

View GitHub Profile
@Daggerpov
Daggerpov / revert-branch-changes.sh
Created December 29, 2025 18:13
Revert Certain File Changes On a Branch
#!/bin/bash
# Base path to prepend to each file
base_path={PATH HERE}
# Check if any file paths were provided
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <file paths>"
exit 1
fi
@Daggerpov
Daggerpov / guidswap.ps1
Created December 29, 2025 18:05
Replace all Guids in a File
## GuidSwap.ps1
##
## Reads a file, finds any GUIDs in the file, and swaps them for a NewGUID
##
# Paste whichever file you'd like to execute this script for
# IMPORTANT.
$filename = "{FILEPATH HERE}"
$text = [string]::join([environment]::newline, (get-content -path $filename))