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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ScribbleGhost
ScribbleGhost / LinksToBookmarks.py
Last active December 10, 2025 08:20
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>

Converting audio to AAC with Fraunhofer FDK AAC (libfdk_aac) in FFmpeg

Check if you have an FFmpeg build supporting libfdk_aac

Run:

ffmpeg -hide_banner -h encoder=libfdk_aac
@ScribbleGhost
ScribbleGhost / uuid.md
Created August 31, 2025 12:37
A "Templater" template used to add a UUID to the title and id property of Obsidian notes

<%* function uuidv4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { const r = Math.random() * 16 | 0; const v = c === 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }); }

const uuid = uuidv4();

@ScribbleGhost
ScribbleGhost / Check a video file for subtitles, subtitle language and subtitle format
Created April 12, 2021 12:47
Check a video file for subtitles, subtitle language and subtitle format with ffprobe
ffprobe -loglevel error -select_streams s -show_entries stream=codec_name,index:stream_tags=language -of csv=p=0 %input%
@ScribbleGhost
ScribbleGhost / Getting file names in a batch script.md
Created April 11, 2021 14:48
How to print file names with and without extensions in a Windows batch script. With relative or full path.

Getting file names in a batch script

Remember:

  • Replace double precentages with single precentage if you want to use it in CMD directly.
  • When file names are printed out, they already include double quotes.
@echo off
@ScribbleGhost
ScribbleGhost / Add Process all files in folder to the context menu.reg
Created October 11, 2020 15:49
Add batch file to the context menu - Process all files in folder
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder]
@="&Process all files in folder"
[HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder\command]
@="\"C:\\Scripts\\Process all files in folder.bat\" \"%1\""
@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 / Parse_a_local_HTML_file_with_Python_3_and_Beautiful_Soup_4.py
Last active February 18, 2025 21:15
Parse a local HTML file with Python 3 and Beautiful Soup 4
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("C:\\path\\to\\your\\html\\file.html", encoding="utf8"), "html.parser")
print(soup.find_all("div", class_="someclass"))