Skip to content

Instantly share code, notes, and snippets.

@DerfJagged
DerfJagged / Rename_Windows_Profile_in_Registry.ps1
Created November 2, 2024 04:26
Rename Windows Profile in Registry
# Script to change all registry entries containing old username to new username.
#
# 1. Create a second admin account on your PC
# 2. Log out of your primary account and into the secondary account
# 3. Rename profile via Control Panel > User Accounts
# 4. Rename old username in C:\Users\ to new username
# 5. Change the two variables below and run the script in Admin PowerShell. It will take a long time.
# 6. Log into the renamed profile and run the script again. This will change the registry entries that may be only editable by the owner account.
# Define the old and new user paths
@DerfJagged
DerfJagged / Delete_Duplicate_Files.py
Created November 1, 2023 02:10
MediaWiki Delete Duplicate Files Script
#!/usr/bin/python3
import requests
import json
import mwclient
################### CONFIGURE ME ###################
site = mwclient.Site('YOUR_WEBSITE.com', path='/wiki/')
site.login(username='USERNAME_HERE', password='PASSWORD_HERE')
URL = "https://YOUR_WEBSITE.com/wiki/api.php"