When you edit a script using Vim, you may want to run the script without actually quitting the editor.
This is easily done using the following Vim command:
<Esc>:!%<Enter> Once the script has run, Vim will display its output and pause until you Press ENTER or type command to continue.
That’s all. It is published here so that I don’t have to query stackoverflow the next time I forget about it 🤣Continue reading...
Using OpenBSD as a daily driver, I got used to having programs being restricted in their permissions. Especially Web Browsers from ports that are patched to implement pledge(2) and unveil(8). Long story short, this guarantees that Firefox, Chromium & friends will get killed if they try to access system resources that they were not allowed to access; be it a device or a file system space.
FreeBSD 14.1, AFAIK, does not implement such feature. And getting a bit paranoid because of “Fish Linux” , I decided my FreeBSD Web browsers should be living in jail.Continue reading...
Most of my workstations are laptops. But because “age”, they are connected to an external 27" 4K monitor. It is used as my primary display and the laptop’s screen is disabled. And as I use WindowMaker as my daily window manager, I sometimes blank myself when I unplug the USB-C cable from the laptop.
There must be a way to automatically switch to the proper display when some USB-C monitors are (dis)connected… Other than switching to using Xfce, KDE, Gnome and other DEs that already implement this feature.Continue reading...
On my OmniOS zones, I don’t use DHCP. Mostly because I don’t have that many of those; DHCP would be overkill and another service to manage. For those configured using IPv4 only, the zadm utility can configure the network stack from a JSON file. But I had that zone where I needed both IPv4 and IPv6 configured and couldn’t have it working via zadm.
So I configured it from within the zone.Continue reading...
While reading logs, I saw that my OmniOS server was not really time synced with the rest of the Wild Wild World. After a quick check, I realised I forgot to set up NTP on this server.
Let’s solve this now!Continue reading...