Skip to content

Instantly share code, notes, and snippets.

View ScribbleGhost's full-sized avatar

ScribbleGhost ScribbleGhost

View GitHub Profile
@ScribbleGhost
ScribbleGhost / autounattend.xml
Last active April 14, 2024 12:15
Install script for Windows 10 that goes straight into audit mode and sets the region and keyboard to Norwegian with English OS language.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Reseal>
<Mode>Audit</Mode>
</Reseal>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0414:00000414</InputLocale>
@ScribbleGhost
ScribbleGhost / autounattend-copyprofile.xml
Created January 23, 2020 23:33
Copies the default profile (copyprofile) after customizing in aduit mode.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0414:00000414</InputLocale>
<SystemLocale>nb-NO</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>nb-NO</UserLocale>
</component>

Windows 10 version 1909

Apps that can be uninstalled from Start:

✔ 3D Viewer

✔ Calculator

✔ Calendar

@ScribbleGhost
ScribbleGhost / Extracting subtitles from video files with SubtitleEdit.md
Last active March 1, 2020 15:34
Extracting subtitles from video files with SubtitleEdit

For all MKV files in a folder:

SubtitleEdit /convert *.mkv SubRip

For all files in a folder:

SubtitleEdit /convert *.* SubRip
@ScribbleGhost
ScribbleGhost / extract_and_remove_subtitles.bat
Created March 1, 2020 15:42
A post process script to extract subtitles embedded in a video file and save them as individual SRT files, then copy the video file whithout the embedded subtitles. This require that both SubtitleEdit and ffmpeg are added to PATH.
@echo off
cd /d %1
echo cd /d %1
echo Trying to extract subtitles...
for %%a in ("*.*") do SubtitleEdit /convert "%%a" SubRip
for %%a in ("*.*") do ffmpeg -i "%%a" -sn -vcodec copy -acodec copy [subtitleless]-%%a
@ScribbleGhost
ScribbleGhost / A list of common digital file format extensions.md
Created March 10, 2020 13:36
A list of common digital file format extensions

.afphoto, .arw, .bmp, .bpg, .cd5, .cpt, .cr2, .crw, .deep, .dib, .dng, .drw, .ecw, .eps, .erf, .exif, .fits, .flif, .gif, .ico, .ilbm, .img, .jfif, .jpe, .jpeg, .jpg, .jxr, .kdc, .kra, .layered, .mdp, .mrw, .nef, .nrrd, .nrw, .orf, .pam, .pcx, .pdn, .pef, .pgf, .plbm, .png, .psd, .psp, .raf, .raw, .rw2, .rwl, .sai, .sgi, .sid, .sr2, .srw, .sun, .svg, .tga, .tif, .tiff, .vicar, .wdp, .webp, .xcf, .xisf

@ScribbleGhost
ScribbleGhost / Bitlocker commands.md
Created March 24, 2020 23:15
A cheat sheet for Windows 10 BitLocker commands

Get the recovery key for a drive:

manage-bde -protectors -get X:

Lock

manage-bde -lock X:
@ScribbleGhost
ScribbleGhost / Remove lines containing string in multiple text files with PowerShell.ps1
Created May 25, 2020 21:44
Remove lines containing string in multiple text files with PowerShell
foreach($file in (dir -r -i *.bat -force)) { $cleaned = gc $file | where { $_ -notlike "*lorem ipsum*" }; sc $file $cleaned }
@ScribbleGhost
ScribbleGhost / xnview.ini
Last active July 3, 2021 11:08
My custom settings for XnView Classic
[AutoCrop]
Tolerance=0
[Browser]
ActionConvert=0
ActionSlide=0
ArrangeBy=7
AutoCollapse=0
AutoPlay=1
BColorFilter01=jpeg, 237 237 202
@ScribbleGhost
ScribbleGhost / Some handy youtube-dl commands for Windows CMD.md
Last active May 31, 2020 10:14
Some handy youtube-dl commands for Windows CMD

Download video to high quality 320kbit/[email protected] MP3 with thumbnail and info embedded

youtube-dl --ignore-config -f [bestaudio/asr=44100] --extract-audio --audio-format mp3 --audio-quality 320k --embed-thumbnail --add-metadata --metadata-from-title "%(artist)s - %(title)s" --output "%userprofile%/desktop/%(title)s.%(ext)s"