/images/avatar.png

OpenConnect

| Ubuntu 22.04 Install certbot 1 sudo snap install certbot --classic Example how to manual generate and revoke certificate 1 2 3 YOUR_DOMAIN=www.ubukubu.ru sudo certbot certonly --manual --preferred-challenges=dns -d ${YOUR_DOMAIN} -d nonexistent.${YOUR_DOMAIN} sudo certbot revoke --cert-path /etc/letsencrypt/live/${YOUR_DOMAIN}/fullchain.pem Get the cert with key 1 2 YOUR_DOMAIN=www.ubukubu.ru sudo certbot certonly --standalone --preferred-challenges http -d ${YOUR_DOMAIN} Run docker container: 1 2 docker pull quay.io/aminvakil/ocserv docker run --name ocserv --sysctl net.ipv4.ip_forward=1 --cap-add NET_ADMIN --security-opt no-new-privileges -p 443:443 -p 443:443/udp -v /etc/letsencrypt/live/${YOUR_DOMAIN}/privkey.

gpg

| Ubuntu 22.04 we need to use /usr/share/keyrings to keep keys for key managed local - /etc/apt/keyrings (need to create it by own with 755 permissions) key should be in binary shape and have the name: repo-archive-keyring.gpg also we should have deb [signed-by=/usr/share/keyrings/repo-archive-keyring.gpg] ... in the line of repo Example for mongo with amd64,arm64: 1 deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse Determinating the type of key: 1 2 3 file repo_signing.

Prometheus grafana

https://github.com/docker/awesome-compose/blob/master/prometheus-grafana/compose.yaml You need to install docker with compose. Install linux node exporter on nodes: Download node_exporter: 1 2 curl -LO https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz tar xvfz node_exporter-1.6.1.linux-amd64.tar.gz Add user: 1 2 sudo groupadd node_exporter sudo useradd -g node_exporter -m -s /sbin/nologin node_exporter Put node_exporter file in PATH directory: 1 2 sudo install node_exporter-1.6.1.linux-amd64/node_exporter /usr/local/bin/ sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter Now, create a service file to running node_exporter process using systemd: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 sudo bash -c 'cat <<EOF > /etc/systemd/system/node_exporter.

Git squash

Quick links | Ubuntu 22.04 Git squash If it’s needed, can set the default editor: git config --global core.editor "vim --nofork" Сделаем ребейз нашей ветки на основную ветку, в данном случае это develop. Before starting, it’s needed to rebase our branch feature/fea-37 to develop branch, for example. Let’s look at- the commit to merge: 1 2 3 4 5 6 7 8 9 10 11 12 git cherry -v develop + 428db8b30e4732b179bfc7d4663c6860214ea343 fea-37 + b41e7856dd5715e3dbff8fd62a6e4a49e46e96e5 fea-37 1 + 06e55320a2f6682277a9702e6a796ac84eab849c fea-37 Improved ansible scripts + d8380d0e994a16c79211a0ec0007676d429d077f fea-37 Changed db URI + 90bad559fa3c2d9d1e6afb9b5816609212e4b931 fea-37 Returned template.

Install theme gohugo

Install theme gohugo: Official instructions 1 2 # cd themes; git clone git@github.com:dillonzq/LoveIt.git; cd - git submodule add git@github.com:dillonzq/LoveIt.git themes/LoveIt Try new theme: 1 hugo server -t LoveIt Set theme LoveIt: 1 2 echo "theme = 'LoveIt'" >> hugo.toml hugo server

Vagrant

Quick links | Ubuntu 22.04 Install vagrant and plugin for libvirt: You should install libvirt 1 2 sudo apt install vagrant sudo vagrant plugin install vagrant-libvirt You can run export VAGRANT_DEFAULT_PROVIDER=libvirt to choose default driver. Get ubuntu image and init Vagrantfile: 1 2 3 4 5 vagrant box add generic/ubuntu2004 --provider=libvirt vagrant box add generic/ubuntu2204 --provider=libvirt vagrant box list vagrant box remove generic/ubuntu2204 vagrant init generic/ubuntu2004 VM provider configuration VM provider network configuration VM configs and more Examples Tips ENV plugin Change setting and run: