Posts

Showing posts from January, 2021

Database Deadlocks

Image
I have had to explain database deadlocks several times and I had this old code project to produce a database deadlock and I had the following scheme for explanation: However it was a bit too little or too confusing to get the idea through sometimes, so I retired the project and recreated a new one on the newest Symfony. It runs on Docker and produces a deadlock by running just one command. It’s on Github:  https://github.com/varfrog/deadlock-symfony . The main point is that a deadlock happens when the same records are being locked by different processes in a different sequence. More on this in the README of the project.

Cyberghost Vpn on Arch Linux

  CyberGhost has apps or shell scripts for various Linux distros but not for Arch Linux, at least not at the time of writing this. However, it is very easy to configure it for Arch. Here’s what I did. Steps Logged into  https://my.cyberghostvpn.com/,  “My Download Apps” -> “Other Apps” -> “Routers and other devices” -> “Configure New Device”. Make the selections, for my setup I’ve selected “Open VPN” as the protocol. Download the OpenVPN configuration files. Extract the archive, mv the files to  /etc/openvpn/client . chmod 600 /etc/openvpn/client/* chown openvpn:network /etc/openvpn/client/* Create an auth file that stores the login credentials for this VPN connection /etc/openvpn/client/login.conf with the username on the 1st line and the password on the 2nd line. Change  auth-user-pass  in cyberghost.conf to  auth-user-pass login.conf . sudo systemctl start openvpn-client@cyberghost sudo systemctl enable openvpn-client@cyberghost Check the I...

Dual booting Arch Linux and Ubuntu on separate SSDs

Image
  Issues I have Arch Linux on one SSD disk and I installed Ubuntu on a new SSD disk. Upon system restart it booted automatically with the GRUB configuration that Ubuntu had installed, not the GRUB configuration that I had for my Arch Linux - BIOS/EFI prioritized the disk Ubuntu is on (issue A, see below). Also this GRUB configuration had an os-prober-generated grub.cfg “menuentry” to boot into my Arch Linux installation (issue B), which unsurprisingly did not work. Disk setup I chose identical setup for both of the SSD’s - and thus an EFI partition in the 2 of them. [root@arch-pc grub.d]# fdisk -l Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors Disk model: ADATA SP580 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: A1ADEEAF-4A37-4807-9C99-6F4B2AAB79D8 Device Start End Sectors Size Type /dev/sda1 2048 534527...