Skip to content

Instantly share code, notes, and snippets.

View ScribbleGhost's full-sized avatar

ScribbleGhost ScribbleGhost

View GitHub Profile
rem ---------------------------------------------------------------------------
rem MY ULTIMATE WINDOWS 11 CUSTOMIZATION SCRIPT
rem ---------------------------------------------------------------------------
rem Tested on Windows 11 IoT Enterprise LTSC 24H2 Build 26100.2033
rem Most of these hacks require signing out and in again.
rem ___
rem Explanation of registry flags:
rem /f = Overwrite
rem /d = Assigns the specified data to the registry value.
@ScribbleGhost
ScribbleGhost / Netflix H.264 v0.0.json
Last active August 28, 2024 07:02
Handbrake 1.8.2 preset. These settings are used by Netflix for Dexter series S01E01 and Dunkirk amongst others. Reduces file by size approx. 40% and maintains approx. 11.7 Mb/s bit rate.
{
"PresetList": [
{
"AlignAVStart": false,
"AudioCopyMask": [
"copy:aac"
],
"AudioEncoderFallback": "av_aac",
"AudioLanguageList": [],
"AudioList": [
📂 Projects
├── 📂 Project_A
│ ├── 📁 Documentation
│ │ ├── 📄 Readme.md
│ │ ├── 📄 Project_Spec.pdf
│ │ └── 📄 Changelog.txt
│ ├── 📁 Source_Code
│ │ ├── 📄 main.py
│ │ ├── 📁 modules
│ │ │ ├── 📄 module1.py
@ScribbleGhost
ScribbleGhost / LinksToBookmarks.py
Last active January 30, 2024 14:18
Got a long list of links you want to add as favorites in your web browser? Use this Python script to convert a CSV file with links to a favorite HTML file that can be imported to any Chromium browsers.
import csv
import html
def csv_to_html_bookmarks(csv_file_path, html_file_path):
header = '''<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
@ScribbleGhost
ScribbleGhost / Force close programs in Windows.md
Last active December 12, 2023 13:01
Force close programs in Windows

Option 1: Use the name of the program

Stop-Process -Name "Adobe Desktop Service" -force

Option 2: Use the path of the program

Get-Process | Where-Object { $_.Path -eq "C:\Program Files\Common Files\Adobe\Creative Cloud Libraries\CCLibrary.exe" } | Stop-Process -Force
@ScribbleGhost
ScribbleGhost / BlockMultipleProgramsInWindowsFirewall.ps1
Last active May 2, 2025 06:41
Block multiple programs in Windows firewall by adding inbound and outbound rules. ⚠ Run as admin in Powershell. Read the description thoroughly ❗
#
# .SYNOPSIS
# This script blocks multiple programs by adding them to the Windows Firewall both as inbound and outbound rules.
# It also checks if a rule is already made. If it exists it will remove it and replace it with the new.
# .NOTES
# 1. List of the programs you want to block in Windows Firewall in $programs.
# 2. Remember quotation marks and a comma at the last program in the list.
# 3. You can change the rule names by changing ruleNameInbound and ruleNameOutbound.
@ScribbleGhost
ScribbleGhost / autounattend.xml
Created November 4, 2023 15:50
My Windows 11 answer file
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<!--
Selects Windows 11 Pro version with a generic key.
Step 1: You have to select which drive to install on. This is a good thing so that Windows does not wipe your drives randomly.
Step 2: Boots into "Who's going to use this device?". You jst enter a username and a password (you can skip the password by leaving it blank).
Then boots into the user account.
-->
<settings pass="offlineServicing"></settings>
<settings pass="windowsPE">
@ScribbleGhost
ScribbleGhost / gifmaker.py
Last active August 28, 2023 12:18
Generate GIFs from either PNG image sequences or video files.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script to generate GIFs from PNG sequences, video files, or folders containing PNGs.
Requirements:
- FFmpeg and Gifski in PATH.
Usage:
1. Drag and drop files/folders onto this script.
2. Follow the on-screen instructions.
@ScribbleGhost
ScribbleGhost / Downmix two stereo tracks in the video to one audio file.bat
Created January 26, 2023 10:10
Downmix two stereo tracks in the video to one audio file
ffmpeg -i %input% -vn -filter_complex amix=inputs=2:duration=longest -ac 2 -c:a libfdk_aac -cutoff 20000 -afterburner 1 -vbr 0 output.m4a
@ScribbleGhost
ScribbleGhost / Generate 34 GB of random data.ps1
Created January 26, 2023 10:09
Generate 34 GB of random data
for ($i=1; $i -le 34; $i++){$out = new-object byte[] 1073742000; (new-object Random).NextBytes($out);[IO.File]::WriteAllBytes("random_data_file$i.txt", $out)}