Skip to content

Instantly share code, notes, and snippets.

View Katzenwerfer's full-sized avatar
🤒
Out sick

Jones Katzenwerfer

🤒
Out sick
View GitHub Profile
@Katzenwerfer
Katzenwerfer / Restart-Session.ps1
Last active February 15, 2023 18:27
Initiate a PowerShell session that restarts on exit
function Restart-Session {
[Alias("ress")]
param ()
[System.Management.Automation.PathInfo]$pathInfo = Get-Location;
while ($true) {
powershell.exe -NoLogo -NoExit -Command "Set-Location $($pathInfo.Path)"
if ($LASTEXITCODE) {
Write-Host -Object "Infinite session stopped" -ForegroundColor Red
break
}
@Katzenwerfer
Katzenwerfer / Wikiwand_Redirect.json
Created January 20, 2023 20:02
Redirect Wikipedia articles to the Wikiwand website
{
"createdBy": "Katzenwerfer",
"redirects": [
{
"description": "Redirect Wikipedia articles to the Wikiwand website",
"exampleUrl": "https://en.wikipedia.org/wiki/the-article-you-want-to-read",
"exampleResult": "https://www.wikiwand.com/en/the-article-you-want-to-read",
"error": null,
"includePattern": "(https?):\\/\\/(.{2})\\.wikipedia\\.org\\/wiki\\/(.*)",
"excludePattern": "(https?):\\/\\/(.{2})\\.wikipedia\\.org\\/wiki\\/(.*\\?)(oldformat=true)",
@Katzenwerfer
Katzenwerfer / Kill_EABackgroundService.xml
Last active January 7, 2023 20:43
A task that kills the EABackgroundService process when the launcher is fully closed
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>Katzenwerfer</Author>
<Description>Kills the EABackgroundService process after the launcher finishes its exit process.</Description>
<URI>\Katzenwerfer\Kill_EABackgroundService</URI>
</RegistrationInfo>
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
@Katzenwerfer
Katzenwerfer / OnTaskTermination.xml
Created January 7, 2023 05:04
An event filter for tasks to run when a specific process is terminated.
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13313 and (EventID=4689)]] and *[EventData[Data[@Name='ProcessName'] and (Data='C:\PATH\TO\EXECUTABLE.exe')]]
</Select>
</Query>
</QueryList>
@Katzenwerfer
Katzenwerfer / dxvk.conf
Last active May 16, 2024 18:15
Configuration file for DXVK [Version 2.3.1]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Expose the HDR10 ColorSpace (DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) #
# to the application by default. #
# This shows to the game that the global Windows 'HDR Mode' is enabled. #
# Many (broken) games will need this to be set to consider exposing HDR output #
# as determine it based on the DXGIOutput's current ColorSpace instead of #
# using CheckColorSpaceSupport. #
# This defaults to the value of the DXVK_HDR environment variable. #
# #
# Supported values: True, False #
@Katzenwerfer
Katzenwerfer / Audacity_Keybinds.xml
Created September 24, 2022 02:38
Personal Audacity Keybinds
<audacitykeyboard audacityversion="3.1.3">
<command name="New" key="Ctrl+Alt+N"/>
<command name="Open" key="Ctrl+Alt+O"/>
<command name="Close" key="Ctrl+Alt+W"/>
<command name="Save" key="Ctrl+Alt+S"/>
<command name="SaveAs" key=""/>
<command name="SaveCopy" key=""/>
<command name="ExportMp3" key=""/>
<command name="ExportWav" key=""/>
<command name="ExportOgg" key=""/>
@Katzenwerfer
Katzenwerfer / opusenc_120ms_framesize.diff
Last active September 24, 2022 02:35
Allow 120ms framesize on opusenc
diff --git a/src/opusenc.c b/src/opusenc.c
index 06838e5..8ae3c46 100644
--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -145,7 +145,7 @@ static void usage(void)
printf(" --speech Tune low bitrates for speech (override automatic detection)\n");
printf(" --comp n Set encoding complexity (0-10, default: 10 (slowest))\n");
printf(" --framesize n Set maximum frame size in milliseconds\n");
- printf(" (2.5, 5, 10, 20, 40, 60, default: 20)\n");
+ printf(" (2.5, 5, 10, 20, 40, 60, 120, default: 20)\n");
@Katzenwerfer
Katzenwerfer / matroska_jxl.diff
Last active September 24, 2022 02:35
Enable storing JXL images inside matroska container
diff --git a/libavformat/riff.c b/libavformat/riff.c
index df7e9df31b..16e37fb557 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -34,6 +34,7 @@
* files use it as well.
*/
const AVCodecTag ff_codec_bmp_tags[] = {
+ { AV_CODEC_ID_JPEGXL, MKTAG('J', 'X', 'L', ' ') },
{ AV_CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
@Katzenwerfer
Katzenwerfer / ffmpeg_opus_fix.diff
Last active September 24, 2022 02:36
Force float decoding for libopus and disable the usage of FFopus decoder
diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
index 31a04df..2857b39 100644
--- a/libavcodec/libopusdec.c
+++ b/libavcodec/libopusdec.c
@@ -63,8 +63,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
}
avc->sample_rate = 48000;
- avc->sample_fmt = avc->request_sample_fmt == AV_SAMPLE_FMT_FLT ?
- AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_S16;
@Katzenwerfer
Katzenwerfer / PriorityTemplate.ps1
Created August 4, 2022 21:31
Script to persistently set the priority of an application that matches the specified name
Set-PSDebug -Trace 0
$process = Get-Process -Id $pid
$process.PriorityClass = 'Idle'
$Application = "" # Name of the application (Get-Process)
$Priority = "" # Priority (Idle|BelowNormal|Normal|AboveNormal|High|RealTime)
function Set-Priority {
$process = Get-Process -Name "$Application"
$process.PriorityClass = "$Priority"