Skip to content

Instantly share code, notes, and snippets.

View boredwz's full-sized avatar

Valentine boredwz

View GitHub Profile
@boredwz
boredwz / windhawk-backup.ps1
Last active July 25, 2026 22:03
(PowerShell script) Backup or restore Windhawk configuration, mods, and registry settings.
<#
.SYNOPSIS
Backup or restore Windhawk configuration, mods, and registry settings.
.DESCRIPTION
Source: https://github.com/ramensoftware/windhawk/issues/195#issuecomment-2581985324
This script checks if Windhawk is installed, then prompts the user
to either create a backup or restore from an existing backup. The
backup includes the ModsSource folder, the Engine\Mods folder, and
the Windhawk registry settings.
@boredwz
boredwz / powershell_slow_startup_fix.ps1
Last active May 16, 2025 21:28
PowerShell slow startup fix
<# USAGE:
& $([scriptblock]::Create((iwr -useb 'https://gist.githubusercontent.com/boredwz/d0bbbd334d49db294d85cebf6b5b19ec/raw/powershell_slow_startup_fix.ps1')))
#>
#requires -Version 5
# Elevate
iwr -useb 'https://gist.githubusercontent.com/boredwz/f7e908dd8d25cc8345ef2065e093d63c/raw/admin.ps1' | iex
If (!(Admin)) {
Write-Warning 'Administrator rights required.';'Press [Enter] or [Y] to run as Admin...'
@boredwz
boredwz / admin.ps1
Last active May 16, 2025 21:17
(PowerShell script) Self-elevate to Administrator, preserve arguments, use Windows Terminal console when possible.
<#
.SYNOPSIS
Self-elevate to Administrator and preserve arguments.
.DESCRIPTION
Self-elevate to Administrator, preserve arguments, use Windows Terminal console when possible.
.EXAMPLE
# Import
@boredwz
boredwz / Get-GithubLatestReleaseUrl.ps1
Last active September 20, 2024 17:15
(PowerShell) Get GitHub latest release URL — attached files, source (zip, tar).
# Get-GithubLatestReleaseURL (PowerShell)
#
# [Author]
# boredwz | https://github.com/boredwz/
#
# [Usage]
# iex "&{$(iwr -useb 'https://gist.githubusercontent.com/boredwz/e7872773f4c44671ca37fad7ca3912b7/raw/Get-GithubLatestReleaseUrl.ps1')} 'author' 'repo'"
# Or download this file:
# & ".\Get-GitHubLatestReleaseURL" author repo
@boredwz
boredwz / HostsEdit.cmd
Last active October 30, 2023 17:24
(CMD) Hosts Edit
:: HostsEdit (CMD)
::
:: [Author]
:: wvzxn | https://github.com/wvzxn/
::
:: [Description]
:: Edit strings in the Windows hosts file.
:: /add - Add
:: /del - Remove
:: /q - Disable output (optionally)
@boredwz
boredwz / RestartExplorer.ps1
Last active September 22, 2024 18:39
(PowerShell) Restart Explorer.exe and restore tabs
<#
.SYNOPSIS
Restart <explorer.exe> and restore tabs
.DESCRIPTION
[Author]
boredwz | https://github.com/boredwz
[URL]
Gist | https://gist.github.com/boredwz/1511cb7f81f0c01f3373a3d2ad8a7e9d