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
| Fasten your seatbelts. It's going to be a bumpy night. |
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
| function Expand-ZipSubdirectory { | |
| <# | |
| .SYNOPSIS | |
| Extracts only a specific subdirectory from a ZIP archive. | |
| .DESCRIPTION | |
| Expand-ZipSubdirectory allows selective extraction of a single subdirectory | |
| from a ZIP file. Unlike Expand-Archive, which extracts the entire archive, | |
| this function filters ZIP entries by path and extracts only the matching | |
| subtree. |
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
| function Start-TimelapseProcessing { | |
| <# | |
| .SYNOPSIS | |
| Copies image files from SD card, renames them, creates a timelapse video using ffmpeg, and compresses it with HandBrake. | |
| - Source: D:\DCIM\100MEDIA | |
| - Destination: $env:USERPROFILE\OneDrive\Desktop\100media\<date> | |
| - Renames files to lowercase | |
| - Creates timelapse video (mp4) | |
| - Compresses video with HandBrake | |
| #> |
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
| There's no place like home. |
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
| I am serious. And don't call me Shirley. |
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
| function Load-Profile { | |
| $env:POSH_THEMES_PATH = (Get-ChildItem /workspaces/* -Recurse -Directory|Where-Object Name -eq themes)[0].FullName | |
| function global:Set-PoshPrompt { | |
| param( | |
| $theme | |
| ) | |
| oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\$theme.omp.json" | Invoke-Expression | |
| } |
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
| function Remove-FileSystemItem { | |
| <# | |
| .SYNOPSIS | |
| Removes files or directories reliably and synchronously. | |
| .DESCRIPTION | |
| Removes files and directories, ensuring reliable and synchronous | |
| behavior across all supported platforms. | |
| The syntax is a subset of what Remove-Item supports; notably, |
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
| $resources = (kubectl api-resources --namespaced=$true 2>$null | Where-Object { $_ -notmatch "events" } | Select-Object -Skip 1 | ForEach-Object { $_.Split()[0] }) | |
| $output_folder = 'C:\temp\K8s-output' | |
| if(!(Test-Path $output_folder)) { | |
| New-Item $output_folder -ItemType Directory | Out-Null | |
| } | |
| foreach($resource in $resources){ |
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
| function Load-Profile { | |
| $env:POSH_THEMES_PATH = '{0}\Programs\oh-my-posh\themes' -f $env:LOCALAPPDATA | |
| function global:Set-PoshPrompt { | |
| param( | |
| $theme | |
| ) | |
| & oh-my-posh.exe init pwsh --config "$env:POSH_THEMES_PATH\$theme.omp.json" | Invoke-Expression | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder