Skip to content

Instantly share code, notes, and snippets.

@matfax
matfax / CommandNotFoundHandler.ps1
Last active July 31, 2025 14:11
PowerShell CommandNotFoundHandler with WSL and Git Alias Fallback
# PowerShell Profile - Add this to your $PROFILE file
# Enable experimental features if needed (PowerShell 7.0-7.4)
if ($PSVersionTable.PSVersion -lt [Version]"7.5.0") {
try {
Enable-ExperimentalFeature PSFeedbackProvider -ErrorAction SilentlyContinue
Enable-ExperimentalFeature PSCommandNotFoundSuggestion -ErrorAction SilentlyContinue
} catch {
# Features may already be enabled or not available
}
@matfax
matfax / .zshrc
Last active July 21, 2025 13:16
Sudo authentication with Windows 1Password CLI on Ubuntu WSL
# ....
alias op="op.exe"
eval "$(op completion zsh)"; compdef _op op.exe
alias sudo="sudo -A"
@matfax
matfax / UIDetect.fxh
Last active November 9, 2020 18:36
C:SL UIDetect Reshade
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// UIDetect 2.0 header file by brussell
// License: CC BY 4.0
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
Description:
UIDetect can be used to automatically toggle shaders depending on the visibility of UI elements.
It's useful for games, where one wants to use effects like DOF, CA or AO, which however shouldn't
be active when certain UI elements are displayed (e.g. inventory, map, dialoque boxes, options