How to assert sorted dates in Cypress

Here's how I use Cypress to assert that the user interface I am building displays datetime information sorted chronologically. Consider the list of dates served at the port 3000 that looks like this: <ul id="sorted"> <li>14.12.1999</li> <li>…

Following file renames in gitlog

After my previous attempt to get published date and the edited date of the post that lives entirely in the git somehow reached the dead end because I could not reliably find out how to handle renames, I have finally found a working way. Start by preparing a file with a git histo…

Prevent push when skipping Cypress tests

There is a more updated method I use now descried in the part 2. Here's way I use to prevent pushing changes when some of the Cypress tests are being skipped Install required packages npm i -D cypress husky start-server-and-test Define your dev script in package.json if not …

Are OTP secrets stored in plaintext

What happens with OTP secrets when a user database get leaked? Could the attacker use them to gain your other sensitive information? How are they even stored on the server? Storing password One of the widely used method to log into some service day is still via form of a password…

Sync Keepass passwords between your computer and phone

The release of the KeepassDX v2.9 brings working autofill in Chrome based browsers in addition to Firefox based ones, here's how to use it on the Android phone with passwords stored on your Arch linux computer. Start by installing required apps on the phone, for instance via F-D…

Why I use losetup instead of udisksctl

Accessing raw filesystem image partitions without the need to specify the offset and size manually sudo pacman -S udisks2 man 1 udisksctl sudo pacman -S util-linux man 8 losetup udisksctl Root permissions are not required udisksctl loop-setup --read-only --file <raw-image&g…

Cross package Node app for ARM using QEMU and Docker

Download 2020-08-20-raspios-buster-armhf-lite.zip from the official site Install required tools sudo pacman -S unzip util-linux docker Start Docker service sudo systemctl start docker.service Add yourself into the docker group, otherwise permissions are needed sudo userm…