Skip to content

Instantly share code, notes, and snippets.

@andyhuey
andyhuey / get-auth-hdr-1.ps1
Created April 7, 2023 12:47
Get the auth hdr and send it to the clipboard.
# get-auth-hdr-1.ps1
# Get the auth hdr and send it to the clipboard.
# ajh 2023-04-06: new.
#Requires -Version 7
#Requires -Modules @{ ModuleName="MSAL.PS"; ModuleVersion="4.0" }
# force TLS 1.2
$TLS12Protocol = [System.Net.SecurityProtocolType] 'Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $TLS12Protocol
@andyhuey
andyhuey / epub2cbz.ps1
Last active December 19, 2024 19:41
A script to convert EPUB files to CBZ (for the specific case of an EPUB with image files following a specific pattern)
# A script to convert EPUB files to CBZ
# (for the specific case of an EPUB with image files following a specific pattern)
# (written with some help from ChatGPT)
# Check if the EPUB file path is provided as a command-line argument
if ($args.Count -eq 0) {
Write-Host "Usage: .\epub2cbz.ps1 <path-to-epub-file>" -ForegroundColor Yellow
return
}
@andyhuey
andyhuey / Obsidian daily template 1.md
Created January 3, 2026 13:23
Obsidian daily template 1
Created
{"date:YYYY-MM-DD" => nil}
Tags
daily

{{date:dddd, MMM DD, YYYY}}

⬅️ [[{{date-1d}}|Yesterday]] / [[{{date+1d}}|Tomorrow]] ➡️

today's tasks: