This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$NewProfileValue, | |
| [Parameter(Mandatory=$false)] | |
| [string]$csprojUserFile | |
| ) | |
| # Locate the .csproj.user file if not specified | |
| if (-not $CsprojUserFile) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reads SRT and writes VTT | |
| param ( | |
| [Parameter(Mandatory = $true)][string]$SrcPath | |
| ) | |
| # Get all of the matching file names | |
| $MatchingFileNames = (Get-ChildItem $SrcPath -File) | sort-Object Name | |
| # walk through the list of files | |
| foreach($MatchingFileName in $MatchingFileNames) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reads VTT and writes SRT | |
| param ( | |
| [Parameter(Mandatory = $true)][string]$localPath | |
| ) | |
| # Function to convert VTT to SRT | |
| function Convert-VttToSrt { | |
| param ( | |
| [string]$filePath | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param ( | |
| [Parameter(Mandatory = $true)][string]$localPath | |
| ) | |
| # Imported tags that we need to filter out | |
| $bad = @("id", "guid", "permalink", "layout", "collect_box_size") | |
| # Get all of the matching file names | |
| $MatchingFileNames = (Get-ChildItem $localPath -File) | sort-Object Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Update MachineSpecificSettings when Windows does to change the UID for the audio hardware | |
| # To use Get-AudioDevice, install AudioDeviceCmdlets | |
| # Install-Module -Name AudioDeviceCmdlets | |
| # See https://github.com/frgnca/AudioDeviceCmdlets | |
| # | |
| # I used https://jsonlint.com/ for verifying the embedded JSON that Adobe uses | |
| # get the latest version of Audition installed | |
| $version = (gci ([IO.Path]::Combine( $env:APPDATA, "Adobe\Audition")) | sort-object Name -Descending | Select-Object -First 1).Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SRT File format https://docs.fileformat.com/video/srt/ | |
| # WebVTT file format https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API | |
| param ( | |
| [Parameter(Mandatory = $true)][string]$localPath | |
| ) | |
| # Get all of the matching file names | |
| $MatchingFileNames = (Get-ChildItem $localPath -File) | sort-Object Name | |
| # walk through the list of files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python3 | |
| # Use this to generate a list of glyph names from a font to a | |
| # text file. This can be passed to pyftsubset to generate a | |
| # small font. | |
| # This can also generate a C# constants class from the font | |
| # Usage: | |
| # dump-cmap.py fontfile.ttf glyphlist.txt | |
| # or | |
| # dump-cmap.py fontfile.ttf constants.cs fontname namespace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python3 | |
| # This script will recursively walk through all of the .xaml files | |
| # in a project and collect the names of the icon font glyphs | |
| # For a line that contains the following markup | |
| # Glyph="{x:Static icons:MaterialDesignIconFont.AccountEditOutline}"/> | |
| # It would return account-edit-outline | |
| # | |
| # Usage: | |
| # WalkThru.py project-folder IconFontAlias |
NewerOlder