wsl
integrate beyond compare in wsl
Inside ~/.gitconfig:
[diff]
tool = bcomp
[difftool]
prompt = false
[difftool "bcomp"]
path = "/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/BCompare.exe"
cmd = "/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/BCompare.exe" "$(wslpath -aw $LOCAL)" "$(wslpath -aw $REMOTE)"
[merge]
tool = bcomp
[mergetool]
prompt = false
[mergetool "bcomp"]
path = "/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/BCompare.exe"
cmd = "/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/BCompare.exe" "$(wslpath -aw $LOCAL)" "$(wslpath -aw $REMOTE)" "$(wslpath -aw $BASE)" "$(wslpath -aw $MERGED)" wsl uses all the ram
port-forward for external connections
In powershell, to port-forward:
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=$ipAddress
To release:
netsh interface portproxy delete v4tov4 listenport=3000 listenaddress=0.0.0.0
To show all currently configured:
netsh interface portproxy show all fixing ubuntu 0x80040326
Ubuntu failing to start, even after reinstall, with:
Error: 0x80040326
Error code: WSL/Service/0x80040326
Press any key to continue...
[process exited with code 4294967295 (0xffffffff)]
Run the following, and then restart:
wsl --update
increase number of open files
Running into EMFILE errors because too many files open? (looking at you npm i):
mylimit=8000
sudo prlimit --nofile=$mylimit --pid $$; ulimit -n $mylimit
su $USER
or
sudo prlimit -p "$$" --nofile=10000:10000
exec $SHELL
ulimit -n 10000 excluding ports from hyper-v
I was having an intermittent problem where a web app running in visual studio would throw an iisexpress error that the port was already in use. The fix was to exclude a range of ports from being grabbed by hyper-v.
netsh int ipv4 set dynamicport tcp start=55000 num=10535
links
1Password-CLI-WSL-Integration provides a WSL wrapper for using the 1Password CLI considering there is no support natively for running the CLI in WSL.