Currently reading articles under label: backend-server-linux

Scala the Language

Install Sbt

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823

sudo apt-get update

sudo apt-get install sbt

ref: scala-sbt.org (v1.0)

Com......

Kubernetes

Install Single-Node for Test

nix

# server

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube

minikube start

# client

sudo apt-get update && sudo apt-get install -y apt-transport-https &......

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)

set prefix=(hdX,Y)/boot/grub

insmod n......

Python Code Cookbook

See also:

Learning Python, the Language

Pandas

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

else:

......

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