Skip to content

Instantly share code, notes, and snippets.

View anotherlab's full-sized avatar

Chris Miller anotherlab

View GitHub Profile
param(
[Parameter(Mandatory=$true)]
[string]$NewProfileValue,
[Parameter(Mandatory=$false)]
[string]$csprojUserFile
)
# Locate the .csproj.user file if not specified
if (-not $CsprojUserFile) {
@anotherlab
anotherlab / Extract-AbsAlt.ps1
Last active February 4, 2026 14:53
Extract absolute altitude (abs_alt) from DJI SRT files
# Extract-AbsAlt.ps1
# Verion 1.02
# Extract absolute altitude (abs_alt) from DJI SRT files
# Usage: .\Extract-AbsAlt.ps1 -InputFile "input.srt" -OutputFile "output.srt" -DownsampleMs 1000 -RemoveFont -RemoveTimestamp
# Required Parameters:
# -InputFile: Path to the input SRT file
# -OutputFile: Path to the output SRT file
# Optional Parameters:
# -DownsampleMs: Interval in milliseconds to downsample the data (0 = no downsampling)
# -RemoveFont: Remove <font>...</font> tags from the output
@anotherlab
anotherlab / backup-wsl2.ps1
Created February 16, 2026 05:38
Automated WSL Distribution Backup Script
<#
.SYNOPSIS
Automated WSL Distribution Backup Script
.DESCRIPTION
This script automatically backs up the default WSL distribution to a compressed archive
and copies it to a specified destination. It performs the following operations:
1. Detects the default WSL distribution
2. Cleans the distribution name to remove problematic characters