Skip to content

Instantly share code, notes, and snippets.

View sba923's full-sized avatar

Stéphane BARIZIEN sba923

  • Charenton-le-Pont, France
View GitHub Profile
@sba923
sba923 / ctime.ps1
Last active January 31, 2024 14:49
Helper for "gci ... | ctime x" PowerShell equivalent to "find ... -ctime x"
# this is one of Stéphane BARIZIEN's public domain scripts
# the most recent version can be found at:
# https://gist.github.com/sba923/792b13b3cd8e14eabd92963622a10de0#file-ctime-ps1
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
$Item,
[Parameter(Position=0)][int] $Days
)
@sba923
sba923 / Export-CsvWithMilliseconds.ps1
Last active March 22, 2026 19:25
Improvement on Export-Csv that includes milliseconds in DateTime properties
#requires -version 7.3
# this is one of Stéphane BARIZIEN's public domain scripts
# the most recent version can be found at:
# https://gist.github.com/sba923/bc52cf74197ab3cddce825e8b502e28b#file-export-csvwithmilliseconds-ps1
<#
.SYNOPSIS
Proxy for Export-Csv that adds milliseconds to DateTime properties
@sba923
sba923 / Get-PowerShellRunningInWindowsTerminalKeyBinding.ps1
Last active May 1, 2026 14:36
PowerShell utilities to deal with keybindings
# this is one of Stéphane BARIZIEN's public domain scripts
# the most recent version can be found at: https://gist.github.com/sba923/5671d24e0ae533689490b504eb5d8401#file-get-powershellrunninginwindowsterminalkeybinding-ps1
#requires -version 7
<#
.SYNOPSIS
Returns effective PowerShell key bindings when running inside Windows Terminal.
.DESCRIPTION
@sba923
sba923 / Get-WindowsTerminalVersion.ps1
Last active April 26, 2026 14:35
PowerShell utilities for Windows Terminal
# this is one of Stéphane BARIZIEN's public domain scripts
# the most recent version can be found at:
# https://gist.github.com/sba923/c41f97a5f4ea15c957227712f42b14f3#file-get-windowsterminalversion-ps1
# cSpell: ignore wekyb bbwe Stéphane BARIZIEN
<#
.SYNOPSIS
Returns the Windows Terminal version for the current PowerShell session host chain.