1. How to print nicely in MacOS terminal path with spaces using pwd

    Something that was bothering me in the past - if I would need to copy paste a path in terminal that have spaces, then I would have to escape spaces manually, which is annoying and slow. Thanks to AI I know have this alias: alias pwd="printf '%q\…

    on macosx pwd terminal

  2. Switching to main/master branch easily

    Have you ever had this problem, when trying to do git checkout master and receiving an error that such branch does not exist ? That's because some projects have switched to a new main branch and other projects are too old and nobody is moving them to main. Remembering which project…

    on bash git master main

  3. Measuring elapsed time in milliseconds in bash

    I was working on a Telemetry project in my company and I had to instrument some of our bash scripts with code that would measure elapsed time of script execution. You can easily achive this with the following code calculate_duration() { # Start time in nanoseconds start_time=$(date +%s%N)…

    on bash date elapsedTime coreutils gnu value too great for base

  4. Cmd+Shift+A ( Find Action ) opens Terminal with some weird error in Intellij product

    As someone who uses Jetbrains products a lot, it can be really annoying when I try to use the "Cmd + Shift + A" shortcut to open the "Find Action" menu and a random terminal window pops up with some gibberish error message. Every time I get a…

    on jetbrains find_action terminal shortkut

  5. Running Jest tests in parallel in Gitlab with multiple jobs

    I've been working a lot lately with Jest tests. Some projects had 1k+ of Jest unit tests. Another project was using Jest for running integration and E2E tests. In both cases we wanted to get feedback on CI as fast as possible. Our initial solution was following: Split tests into…

    on gitlab jest parallel ci

  6. Fixing "The following signatures couldn't be verified because the public key is not available: NO_PUBKEY: %s" error

    I was recently trying to build an old Docker container for one of our projects and I faced this error: #7 10.88 W: GPG error: http://apt.datad0g.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY {{key}} #7 10.…

    on docker debian keyserver