VPS Setup for Hosting This Hugo Site

System information: Debian GNU/Linux 12 (bookworm)

Installing

Oh My Zsh

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
apt-get update
# install ZSH
# apt-get update
apt install zsh -y
zsh --version # Expected result: zsh 5.0.8 or more recent.
# zsh 5.9 (x86_64-debian-linux-gnu)
chsh -s $(which zsh) # set zsh as default shell
# sudo chsh -s /bin/zsh <myUserName>
# new session
echo $SHELL # test
# /usr/bin/zsh

# install git
apt install git -y
git version
# git version 2.39.2

# install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# install plugins
## zsh-autosuggestions
## https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
## add zsh-autosuggestions to the list of plugins (~/.zshrc)

source ~/.zshrc

Docker

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# https://docs.docker.com/engine/install/debian/#install-using-the-repository
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# install the latest version
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# verify that the installation
sudo docker run hello-world
docker version
# ...
# Version:           24.0.6
# ...

HTTPS

Register and auto-renew SSL certificates with acme.sh.

...

October 25, 2023 · 5 min · 985 words · fgh

Utility Traits in Rust

Chapter 13. Utility Traits

July 3, 2023 · 35 min · 7250 words · fgh

Operator Overloading in Rust

Chapter 12. Operator Overloading

June 20, 2023 · 17 min · 3567 words · fgh

Visa, J-1, J-2, EAD

June 14, 2023 · 17 min · 3521 words · fgh

Traits and Generics in Rust

Chapter 11. Traits and Generics

June 5, 2023 · 51 min · 10671 words · fgh