Skip to content

Instantly share code, notes, and snippets.

@zydezu
zydezu / backupcomputer.bat
Last active January 21, 2026 01:05
Backup the windows user directory to where the directory this .bat file is run.
@echo off
setlocal EnableExtensions EnableDelayedExpansion
REM ===== Configuration =====
set BACKUP_DEST=.
for /f %%I in ('powershell -NoProfile -Command "Get-Date -Format yyyy-MM-dd_HH_mm_ss"') do set TIMESTAMP=%%I
set BACKUP_FILE=%BACKUP_DEST%\%TIMESTAMP% zydesktop.7z
set LOG_FILE=%BACKUP_DEST%\%TIMESTAMP%_backup.log
set FAIL_LOG=%BACKUP_DEST%\%TIMESTAMP%_backup_failed.log
@zydezu
zydezu / watchjxr.ps1
Last active December 17, 2025 03:52
Convert jxr (HDR) screenshots saved by GameBar to HDR pngs, copying them to the clipboard, ready for sharing. Uses https://github.com/ledoge/jxr_to_png. Use Windows + Alt + PrtScn to save a screenshot using GameBar.
# Uses jxr_to_png.exe from https://github.com/ledoge/jxr_to_png
Add-Type -AssemblyName PresentationCore
Add-Type -AssemblyName WindowsBase
Add-Type -AssemblyName System.Windows.Forms
function Copy-FileToClipboard {
param([string]$filePath)
$files = New-Object System.Collections.Specialized.StringCollection