Compact a WSL distro's virtual disk to reclaim unused storage space.
WSL's virtual disk grows when needed but doesn't shrink by itself. Here is how to reclaim the unused space. This can sometimes free hundreds of GBs for use on Windows.
#ifndef CALLABLE_TRAITS_HPP_INCLUDED | |
#define CALLABLE_TRAITS_HPP_INCLUDED | |
#include <type_traits> | |
// synopsis | |
//////////////////////////////////////////////////////////////////////////////// | |
template <typename> | |
struct callable_traits; |
[ | |
{ | |
"key": "ctrl+shift+alt+p", | |
"command": "workbench.action.tasks.runTask", | |
"args": "run premake" | |
}, | |
{ | |
"key": "ctrl+shift+alt+b", | |
"command": "workbench.action.tasks.runTask", | |
"args": "build" |
CREATE TABLE Dates ( | |
iso TEXT NOT NULL, | |
julian REAL NOT NULL, | |
unix INTEGER NOT NULL UNIQUE, | |
CHECK(iso = date(unix, 'unixepoch', 'start of day')), | |
CHECK(unix = strftime('%s', date(iso, 'start of day'))), | |
CHECK(julian = julianday(unix, 'unixepoch')) | |
); |
# | |
# Run this script as admin | |
# | |
# The first two variables should be edited | |
# according to your situation. | |
# | |
$ports=@(80,21,154) # the ports you want to open. | |
$addr='0.0.0.0'; # target address. 0.0.0.0 is good for most cases. | |
$wslIP = bash.exe -c "hostname -I" |
#!/bin/bash | |
Base="$(basename -s'.sh' "$0")" | |
Help() | |
{ | |
cat <<! | |
Print all fields line by line. |
#!/bin/bash | |
######################################################### | |
## ## | |
## Create dev project and launch Visual Studio Code ## | |
## ## | |
######################################################### | |
### Please customize here ### |
#!/bin/bash | |
declare -r Base_name=$(basename -s .sh "$0") | |
help() | |
{ | |
cat <<-EOD | |
Man Grep | |
Conveniently lookup a keyword in a man page. |