Skip to content

Instantly share code, notes, and snippets.

Avatar

Giuseppe Sorrentino glsorre

View GitHub Profile
@glsorre
glsorre / keychain.ps1
Last active May 23, 2022
Windows Subsystem for Linux: never prompt ssh passphrase again
View keychain.ps1
$credentials = Get-StoredCredential -Target sshpassphrase
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($credentials.Password)
$passphrase = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
C:\Windows\System32\wsl.exe -u [YOUR_WSL_USERNAME] -d [YOUR_DISTRIBUTION] /home/[YOUR_WSL_USERNAME]/wslu/keychain.sh $passphrase
@glsorre
glsorre / .gitignore
Last active Jul 2, 2021
A functional boilerplate for https://screeps.com with creeps based on the fsm pattern