Skip to content

Instantly share code, notes, and snippets.

@danalec
danalec / Microsoft.PowerShell_profile.ps1
Created November 19, 2025 17:27
add this to $PROFILE
# rga/rg wrapper
# replicates rg defaults: case-sensitive by default; line numbers when output is a TTY
function rg {
param([Parameter(ValueFromRemainingArguments=$true)]$args)
$hasCase = $false
foreach ($a in $args) { if ($a -in @('--ignore-case','-i','--smart-case','-S','--case-sensitive','-s')) { $hasCase = $true; break } }
$lineArgs = @()
if (-not [Console]::IsOutputRedirected) { $lineArgs += '--line-number' }
$caseArgs = @()
if (-not $hasCase) { $caseArgs += '--case-sensitive' }
@danalec
danalec / keybase.md
Created June 14, 2014 11:36
keybase.io proof

Keybase proof

I hereby claim:

  • I am danalec on github.
  • I am danalec (https://keybase.io/danalec) on keybase.
  • I have a public key whose fingerprint is 4854 466B 95B5 3AEB 9976 29AA 59FD 633B 1941 3F7E

To claim this, I am signing this object: