Skip to content

Instantly share code, notes, and snippets.

View futuremotiondev's full-sized avatar
:octocat:
Coding Zen

Jay futuremotiondev

:octocat:
Coding Zen
View GitHub Profile
function Convert-SVGCropWithInkscape {
[CmdletBinding()]
param (
[parameter( Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName )]
[ValidateScript({
if ($_ -notmatch '[\?\*]') {
$true
} else {
throw 'Wildcard characters *, ? are not acceptable with -LiteralPath'
}
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\a08_FolderOperations\shell\a38_ScanWithVirusTotal]
@="Scan Contents with VirusTotal"
"Icon"="\"C:\\Icons\\00 Linked\\FileUtilScanVirusTotal.ico\""
[HKEY_CLASSES_ROOT\Directory\shell\a08_FolderOperations\shell\a38_ScanWithVirusTotal\command]
@="cmd /k \"\"C:\\Tools\\Sysinternals\\sigcheck64.exe\" \"-u\" \"-h\" \"-vr\" \"-vt\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\a08_FolderOperations\shell\a42_ExtractContainingArchives]
@futuremotiondev
futuremotiondev / Convert-SVGtoICO Magick Errors.ps1
Created January 29, 2025 13:03
Problems with converting multiple PNGs to 32-Bit ICO using ImageMagick in PowerShell.
using namespace System.Collections.Generic
using namespace System.Collections.Concurrent
using namespace System.IO
function Convert-SVGToICOWorking {
[CmdletBinding(DefaultParameterSetName = "Path")]
param (
[Parameter(
Mandatory,
Position = 0,
@futuremotiondev
futuremotiondev / Boilerplate: Accumulate Files and Process In Parallel.ps1
Created February 7, 2025 23:05
Accumulates files from all directories or files passed into the function and then processes in parallel at the end block. Supports wildcards, pipeline input, and literal paths.
using namespace System.IO
using namespace System.Collections.Generic
function Convert-ParallelFileAccumulator {
[CmdletBinding(DefaultParameterSetName='Path')]
param (
# Define the 'Path' parameter, allowing wildcards and pipeline input
[Parameter(
Mandatory,
Position = 0,
@futuremotiondev
futuremotiondev / Get-ImageDimensions.ps1
Created February 7, 2025 23:14
Retrieves basic image dimensions using System.Drawing.Image, and processes passed images in parallel.
using namespace System.Collections.Generic
function Get-ImageDimensions {
[cmdletbinding(DefaultParameterSetName = 'Path')]
param(
[Parameter(
Mandatory,
Position = 0,
ValueFromPipeline,
ValueFromPipelineByPropertyName,