Skip to content

Instantly share code, notes, and snippets.

View sean-mcardle's full-sized avatar

Sean McArdle sean-mcardle

  • State of Oregon
View GitHub Profile
@sean-mcardle
sean-mcardle / CsvToMD.ps1
Created September 16, 2025 16:36
Script for converting a CSV file to markdown. Note: the CSV is loaded into memory, not streamed from disk. Probably not suitable for large files.
function CsvToMd {
param ($PathToCsv)
if (-not (Test-Path $PathToCsv)) {
throw [System.IO.FileNotFoundException]::new("Provided path doesn't resolve to a CSV file", $PathToCsv)
}
$records = import-csv $PathToCsv
$header = ($records | select -First 1).PSObject.Properties.Name
function Out-SelectorMenu {
param (
[Parameter(ValueFromPipeline=$true)]
$InputObject,
[Parameter(Position=0)]
$Title
)
begin {
$_items = @()
}
################################################################################
## Helper Functions ##
################################################################################
function DecodeJwt {
param ($encodedToken)