Skip to content

Instantly share code, notes, and snippets.

View andjo's full-sized avatar

Anders Johansson andjo

  • Roxen AB
  • Linköping, Sweden
View GitHub Profile
wsl --export Ubuntu C:\WSLStorage\backups\Ubuntu-tmp.tar
if ($LastExitCode -eq 0) {
rm C:\WSLStorage\backups\Ubuntu-done.tar
mv C:\WSLStorage\backups\Ubuntu-tmp.tar C:\WSLStorage\backups\Ubuntu-done.tar
} else {
rm C:\WSLStorage\backups\Ubuntu-tmp.tar
}
# Start-Sleep 10
@andjo
andjo / wsl2-network.ps1
Last active May 16, 2023 09:24 — forked from daehahn/wsl2-network.ps1
WSL2 network forwarding
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}

Keybase proof

I hereby claim:

  • I am andjo on github.
  • I am andersjo (https://keybase.io/andersjo) on keybase.
  • I have a public key whose fingerprint is 04FB FFC2 1CD6 4468 7B9D 3F23 FA2B 7995 61F4 FD3A

To claim this, I am signing this object:

askersund.se
bengtsfors.se
bollebygd.se
borlange.se
bracke.se
degerfors.se
dorotea.se
eslov.se
essunga.se
falun.se