/images/avatar.png

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:

Bridge with nmcli and KVM

Quick links | Ubuntu 22.04 Get current network config: 1 2 nmcli con show nmcli connection show --active We musn’t use wireless interface? I’ve spend a lot of time to find solution, but wireless bridge always doesn’t work. This approach also doesn’t work: 1 2 3 4 5 6 7 8 # To bridge wifi interface you may use iw tool to enable 4addr likewise: # iw dev <wifiInterface> set 4addr on # brctl addif <bridgename> <wifiInterface> can't add <wifiInterface> to bridge <bridgename>: Operation not supported # iw dev <wifiInterface> set 4addr on # brctl addif <bridgename> <wifiInterface> Now it should work.

Installing OpenVPN server

Quick links | Ubuntu 22.04 | Openvpn 2.6 openvpn3 client openvpn Free | No time limit, no credit card Community Resources Create vpn server anywhere, I created on Hetzner. And make A-record to ip address. For example ovpn.dodcaf.ru A 5.161.48.201. Install openvpn: 1 2 sudo apt update \ && sudo apt install -y openvpn easy-rsa EasyRSA: 1 2 sudo cp -r /usr/share/easy-rsa /etc/openvpn \ && sudo ln -s /etc/openvpn/easy-rsa/openssl-easyrsa.cnf /etc/openvpn/easy-rsa/openssl.cnf Create vars and fill:

Get absolute path for a file

We need to install mlocate: 1 apt install mlocate Update the db: 1 sudo updatedb And find some file: 1 2 locate just-file-name.txt locate or-part-of-file-nam Example: 1 2 locate mcypr_lin___ovpn.ovpn /etc/openvpn/kz/mcypr_lin___ovpn.ovpn