Skip to content

Instantly share code, notes, and snippets.

@RezaBabapour
RezaBabapour / autoSave.ps1
Last active January 21, 2026 15:33
Local autoSave for Microsoft word exel powerPoint
# Run command: powershell -ExecutionPolicy Bypass -File .\autoSave.ps1
Add-Type -AssemblyName System.Windows.Forms
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class WinActive {
[DllImport("user32.dll")]
@Ethorbit
Ethorbit / gpupv-acceleration-tut.md
Last active January 7, 2026 06:03
Hyper-V tutorial to partition GPU for virtualization + achieve full GPU acceleration with it and daily drive it.
@jwallet
jwallet / Microsoft.PowerShell_profile.ps1
Last active December 9, 2023 00:46
Windows Powershell functions to convert video files with mkvmerge from mp4 and avi to mkv and set all mkv default audio and video language to your desired language with mkvpropedit all in batch to be used for your PLEX server or something else.
# Credit: https://www.github.com/jwallet
function mkv-set-language([string]$lang="eng") {
Get-ChildItem -Path "." -Name -Recurse -File -Include *.mkv | ForEach { echo ">>> Getting file: $_"; Set-ItemProperty $_ -name IsReadOnly -value $false | & 'C:\Program Files (x86)\MKVToolNix\mkvpropedit.exe' --tags all:'' --delete title --edit track:v1 --set language=$lang --edit track:a1 --set language=$lang "$_" }
}
function to-mkv([string]$lang="eng") {
Get-ChildItem -Path "." -Name -Recurse -File -Include *.avi,*.mp4 | ForEach { echo ">>> Getting file: $_"; $_ -match '(?<filename>.*)[.]'; $output = $matches["filename"] + ".mkv"; Set-ItemProperty $_ -name IsReadOnly -value $false | & 'C:\Program Files (x86)\MKVToolNix\mkvmerge.exe' -o $output --default-language $lang "$_" }; mkv-set-language $lang;
}