Skip to content

Instantly share code, notes, and snippets.

View hsupu's full-sized avatar
🌏
Inside

Hsu Pu hsupu

🌏
Inside
View GitHub Profile
@hsupu
hsupu / cl.ps1
Last active September 1, 2022 14:54
Call cl.exe in ad-hoc way
# param (
# [Parameter(ValueFromRemainingArguments)]
# [AllowEmptyCollection()]
# [string[]]$Params
# )
param()
$ErrorActionPreference = 'Stop'
trap { throw $Error[0]; }
@hsupu
hsupu / pgcli.ps1
Created July 16, 2024 09:51
Postgres Initializer
<#
.LINK
https://www.postgresql.org/docs/current/app-pg-ctl.html
#>
param(
[string]$DataDir,
[switch]$InitDataDir,
[string]$ServiceName,
[switch]$Register,