- Backup current vhdx file
from
%LOCALAPPDATA%\Packages\<PackageFamilyName>\LocalState\ext4.vhdx
toD:\ext4.vhdx
(Most important step. If you can't find correct vhdx file, you shouldn't go ahead) - Remove current distro, like wsl --unregister Ubuntu-20.04
- Reinstall distro from Microsoft Store
- Export and import
wsl --export Ubuntu-20.04 D:\wsl.tar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### DOCKER ###### | |
# Remove old version of docker | |
sudo apt-get remove docker docker-engine docker.io | |
# Allow apt install from HTTPS | |
sudo apt-get update && \ | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn gcd [value1 value2] | |
(if (zero? value2) | |
value1 | |
(recur value2 (mod value1 value2)))) | |
(gcd 150 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn gcd_rec(value1: i32, value2: i32) -> i32 | |
{ | |
if value2 == 0 | |
{ | |
return value1; | |
} | |
return gcd_rec(value2, (value1 % value2)); | |
} | |
fn gcd(mut value1: i32,mut value2: i32) -> i32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from sympy import * | |
init_printing() | |
def lagrange(matrix): | |
size = len(matrix) | |
x = Symbol('x') | |
a = 0 | |
for k in range(0, size): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host * | |
ServerAliveInterval 120 | |
ServerAliveCountMax 30 | |
ConnectTimeout 30 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Data] | |
DataCount=1 | |
[Data_1] | |
Comment=should never see | |
DataCount=4 | |
Enabled=true | |
Name=should never see | |
SystemGroup=2 | |
Type=ACTION_DATA_GROUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from werkzeug.exceptions import HTTPException | |
app = Flask(__name__) | |
@app.errorhandler(HTTPException) | |
def http_exception_handler(e): | |
return {'code': e.code, 'description': e.description} | |
if __name__ == '__main__': |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
First in a powershell create a new network switch
New-VMSwitch -SwitchName "SwitchName" -SwitchType Internal
Get-NetAdapter // (note down ifIndex of the newly created switch as INDEX)
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex <INDEX>
New-NetNat -Name MyNATnetwork -InternalIPInterfaceAddressPrefix 192.168.0.0/24
In your ubuntu server open your network netplan
OlderNewer