Tag: bash

Store mikrotik backup in repository

I am not a power user of Mikrotik devices so far, judging by the fact that I am not using terminal there as much as I am using web interface (or WebFig as they call it). But Mikrotik, being a powerful platform can help me understand what I am doing. One of the things I figured ou…

PHP test watcher for MacOS

I was successfully able to use my previous Laravel test watcher for a very long time, while I was on Linux. But now on Mac, it does not work, as mac does not support inotifywait. Mac does however support similar thing, called fswatch, install via Brew: brew install fswatch Howev…

Fix ANSI data in nvim execute

After migrating my dotfiles over to Mac M3 I stumbled into roadblock issue for my neovim setup. Every time I saved a PHP file, a lot of garbled data got prepended at the beginning of said file. If you remember so far back, my setup uses prettier for formatting everything, mostly …

Post checkout composer install hook

Sometimes when working on a PHP project where there are a lot of branches potentially sitting on incompatible packages, it can be a pain to always remember to manually run composer i or whatever docker alternative or alias one might be using. After forgetting, there are error mes…

Optimize many PDFs at once

I had to work with many scanned PDF documents that were saved in a very un-optimal way, each one having up to tens of MBs. This was not suitable for sending via email and also unnecessary. I saw an option on my girlfriend's Mac to optimize PDF. The result was that her document dr…