Python Code Reuse

execfile or os.system

execute the other python file in place:

execfile("/path/to/my/lib/mylib.py")

or:

import os

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

import

import sys

import os

sys.path.append(os.path.abspath("/path/to/my/lib"))

import mylib

ref

See ot......

Boot Partitions, Install Multi-OS

See also: easy2boot, Automatic-Unattended-Install-of-Ubuntu.

When installing Ubuntu, it will decide what kind of partition to use:

Ubuntu decicison tree for using entire disk:

? installer booted in EFI mode or BIOS mode?

* EFI

: use gpt and never make biosboot

* BIOS

? is the disk larg......

Steps to Check Netwok Interface Card (NIC) Configurations

Check the physical NIC is connected.

lspci

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:

ifconfig

Quota

INSTALL

apt-get install quota

CONFIG

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 file ......

VirtualBox Network and Skills

OBS: cloning a VM with the status of pause (not powered-off), it canNOT re-initialize the MAC address. Thus, it is necessary to disconnect the cable and poweroff to re-initialize the MAC and then boot.

INSTALL ON UBUNTU

Tested on v18.04.

sudo apt-get update && \

sudo apt-get -y install vir......

Restful API

The insomnia client is used, (Postman is too slow, SoapUI has not been tested).