Installing WSL 2


Windows 10 May 2020 (2004) // or older Windows 10 May 2019 (1903) / or Windows 10 November 2019 (1909)

A computer with Hyper-V Virtualization support

Steps Overview

Enable WSL 2

Enable ‘Virtual Machine Platform’

Set WSL 2 as default

Install a Linux distro

Download the latee......

Powershell PS In Case Of

See also SSH.

Overview: for both server and client: enable remote manager on both sides; set the other side as trusted.

On both:

Enable-PSRemoting -SkipNetworkProfileCheck -Force

Set-Item wsman:\localhost\Client\TrustedHosts -value 192.168.1.*

On the client:

Enter-PSSession 192.168.......

Migrate from (old) FarBox to Bitcron

Migratingmethod 1 - manual cp

Official doc suggest to copy manually to the new Dropbox folder (/Apps/Bitcron/internal-domain-name).

WARN for & template (see ref-doc-fr.-farbox)

method 2 - build in

More...(更多...), 再选择 “Move from FarBox”

WARN for images: "注意: 如果原 FarBox 网站......

Scala the Language

Install Sbtecho "deb /" | sudo tee -a /etc/apt/sources.list.d/sbt.list

sudo apt-key adv --keyserver hkp:// --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823

sudo apt-get update

sudo apt-get install sbt

ref: (v1.0)


Kubernetes (k8s)

Install Single-Node for Testnix# server

curl -LO && sudo install minikube-linux-amd64 /usr/local/bin/minikube

minikube start

# client, via snap (snap will NOT work in Docker-like containers)

sudo snap install kube......

GRUB Rescue

When being forced into GRUB rescue mode, run ls and ls <one_partition> to check available partitions and find the one that we should boot from [ref].

Then set prefix & root[ref]:

set root=(hdX,Y)


Python Code Cookbook

See also:

Learning Python, the Language


Get column_nr in pandas/numpy.

if isinstance(X, pd.DataFrame):

X_is_df = True

row_nr = X.shape[0]

column_nr = X.shape[1]

if isinstance(X.columns, pd.core.index.MultiIndex):

df_columns_is_multi_index = True


df_columns_is_multi_index = Fals......

Python Code Reuse

execfile or os.system

execute the other python file in place:



import os

os.system("python /path/to/my/lib/")

importimport sys

import os


import mylib



Steps to Check Netwok Interface Card (NIC) Configurations

Check the physical NIC is connected.


Note: The NIC will be shown regardless if drivers are installed, this is a PCI feature. Ref.

Then check if it is recognized as network interfaces:

ifconfig -a

Check if it is up:



INSTALLapt-get install quota


Add options usrquota,grpquota in /etc/fstab:

UUID=a5bcc8d7-asdf / ext4 errors=remount-ro,usrquota,grpquota 0 1

Set quota:

setquota -u -F vfsv0 USERNAME 4000000 5000000 0 0 /

4 000 000 ≈ 4GB.

OBS: block size is always 1 KB as unit, regardless......

Powershell In Case Of

Use Microsoft Terminalchoco install -y microsoft-windows-terminal

Customizing PS Prompt (Use ConEmu)

See more in [codeship].