Skip to content

Instantly share code, notes, and snippets.

View stopthatastronaut's full-sized avatar

Jason Brown stopthatastronaut

View GitHub Profile
# Sets the title of a window when running in mac terminal
Function Set-WindowTitle {
param($in)
write-host "`e]1;$in`a"
}
@stopthatastronaut
stopthatastronaut / gist:ef53078be69009c634356452efb693f2
Created July 18, 2025 12:04
Convert-Base64 PowerShell function
Function Convert-Base64 {
param([string]$instring)
# Convert string to byte array
$bytes = [System.Text.Encoding]::UTF8.GetBytes($instring)
# Convert byte array to Base64 string
$base64String = [System.Convert]::ToBase64String($bytes)
# Output the Base64 string