I hereby claim:
- I am brar on github.
- I am brar_piening (https://keybase.io/brar_piening) on keybase.
- I have a public key ASCtYiNokHuDLm8_ZaXTC1Y2UQK2uFEOGp8QFG1SRuOsvwo
To claim this, I am signing this object:
#Requires -Version 7.3 | |
[CmdletBinding()] | |
Param( | |
[Version]$TargetVersion = [Version]::new([int]::MaxValue,[int]::MaxValue,[int]::MaxValue,[int]::MaxValue), | |
[string]$Server = 'localhost', | |
[ushort]$Port = 5432, | |
[string]$UserName = [Environment]::UserName, | |
[Parameter(Mandatory)][string]$Database, | |
[string]$ApplicationUser = $Database, | |
[string]$AdminUser = "$Database.Admin", |
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"version": 2, | |
"auto_upgrade": true, | |
"final_space": true, | |
"shell_integration": true, | |
"patch_pwsh_bleed": true, | |
"blocks": [ | |
{ | |
"alignment": "left", |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
Import-Module posh-git | |
Import-Module git-aliases -DisableNameChecking | |
Import-Module Terminal-Icons | |
# Oh My Posh configuration | |
$ohMyPoshTheme = Get-Item "$env:HOME/.ohMyPoshTheme.omp.json" -Force -ErrorAction Ignore | |
if (-not $ohMyPoshTheme) { |
# Warning! Only start this in an empty directory as it creates and deletes files and directories | |
# This is tested on Windows and Linux. | |
# The PostgreSQL bin directory has to be in your PATH and you need a modern PowerShell (> 6.0) | |
$port = $mainServerPort = 5433 | |
$mainServerId = 1 | |
$mainServerName = "cluster " + $mainServerId | |
$mainServerPath = "cluster" + $mainServerId.ToString("000") | |
$previousPort = -1 |
# Warning! Only start this in an empty directory as it creates and deletes files and directories | |
# Choose a non-default port to avoid issues with a cluster that's already running | |
$port = 5433 | |
$beforePointInTimeValue = "We want to keep this one!" | |
$afterPointInTimeValue = "We want to get rid of this one!" | |
# Initialize a new cluster | |
Write-Host "Initializing a new cluster..." | |
initdb -D pitr_cluster -A trust > $null |
# Requires PowerShell 6+ | |
# Some commands will fail if the PostgreSQL bin directory is not in your PATH | |
# The pg_ctl reload command may require running it with Administrator rights | |
$data_directory, $pg_hba_conf_path, $pg_ident_conf_path = psql -c "SELECT setting FROM pg_settings WHERE name IN ('data_directory', 'hba_file', 'ident_file') ORDER BY name" -tU postgres | | |
%{ $_.Trim() } | | |
where { $_.Length -gt 0 } | | |
Convert-Path | |
# Add a user mapping for domain users (or local users if your computer is not in a domain) to your pg_ident.conf |
I hereby claim:
To claim this, I am signing this object:
using System; | |
using System.Text; | |
namespace FormatArray | |
{ | |
class Program | |
{ | |
private const string THREE_DOTS = "..."; | |
private const int StringLen30 = 30; | |
private const int StringLenUnlimited = 0; |