Shortly after diving heads down into the MeshCore craze, I naturally started amassing solar panels for my MeshCore-related projects. 
 Upon working with these panels in practice, I realized that most of them are sold with notoriously deceptive technical specs. (A 10x10 cm panel delivering 5W? Seriously?) And when the ads try to be honest with regard to power output, you never know if they are…
I’m running Doom Emacs v3.0.0-pre, and was trying to use org-crypt to encrypt org headings tagged with :crypt: . I couldn’t make it work, even by manually invoking org-encrypt-entries . The error message didn’t help: 
 GPG error: 'Encrypt failed', 'Exit'
 Turns out epg-pinentry-mode should be loopback , but for some reason defaulted to nil in my setup. 
 Here’s…
Today I tried to install Simon Willison’s llm tool on FreeBSD. I use uv as my Python package manager, and no matter what I did, I was hitting the same error: 
 $ uv tool install llm --with pysqlite3

...

 In file included from src/blob.c:1:
 src/blob.h:4:10: fatal error: 'sqlite3.h' file not found
 4 | #include 'sqlite3.h'
 | ^~~~~~~~~~~
 1 error…

 This post is an account on how I configured my FreeBSD home server in a way that I could seamlessly route my DNS requests through my self-hosted AdGuard Home instance, both at home and outside using Tailscale and nginx. 
 Details 
 At the time of this post: 
 
 My home server is running FreeBSD 14.3 with a static IP in my home subnet, 192.168.3.101 . 
 For managing jails,…
There’s a crazy bug in Cinnamon (more specifically, Cinnamon’s screensaver) that had been pestering me since I switched to this DE . It’s an issue that has been ongoing for many years without an official solution. When the computer is idle for some time and the screensaver kicks in, you can’t regain access unless you switched to another TTY (via Ctrl + Alt + F<n> ) and…
Suppose you need to edit a file that requires root privileges, like /etc/fstab . One way to do this is simply invoking your editor of choice with sudo : 
 sudo vim /etc/fstab
 Running a command with sudo is equivalent to logging in as root and then running the desired command. That means the loaded configuration will be root ’s, not the user’s. 
 A better way to do that is…
Cinnamon is, in my opinion, one of the most polished desktop environments out there. I came to this conclusion after a lot of frustration at other DEs and how they managed HiDPI displays. While Gnome, KDE, xfce, and i3 would go crazy with my plugging and unplugging the 4K monitor, Cinnamon handled these events just fine, always guessing the correct screen and text scale and without graphical…
Today I learned that commented out Elisp code with ;;; in Emacs are interpreted as headings when you’re in outline-minor-mode . That means that you can create hierarchical headings (e.g. one level is ;;; , two levels is ;;;; ), and you can fold each heading with outline-cycle . 
 Since when I migrated my workflow to Doom Emacs, my custom configuration file grew out of control. One way to…
Today I learned a very cool trick. I can grep a pattern inside a given directory by running :grep pattern /path/to/dir . Vim will execute a grep command externally and put the results into a quickfix list. 
 The quickfix list is basically a dynamic buffer where Vim stores lists of values. In this case, all results returned by the external grep command end up in there, and you can navigate the…
In one of my recent projects, I used Azure Durable Functions extensively to orchestrate multi-stage, asynchronous machine learning inference requests. It worked like a charm in spite of Azure’s misleading and/or outdated documentation on the Python SDK of their own product. 
 But then at a certain point of the project, I had to implement a timer-triggered orchestration history purge to…
Azure’s Durable Functions are asynchronous, scalable cousins of standard Azure Functions. They’re basically composed of a main orchestrator function (though you can also work with multiple sub-orchestrators), and a series of activity triggers , which are subfunctions to be launched asynchronously by the orchestrator. 
 Both activity triggers and orchestrator functions run in…
tl;dr don’t trust Azure ML charts. 
 In a recent project, we relied heavily on Azure ML workspaces. All of our models had been deployed as Azure-managed online endpoints. Letting Azure manage the endpoints was the wise thing to do, given that we had limited personnel to keep a sane Kubernetes ecosystem. 
 Nonetheless, we found the endpoint latency a bit too high. The first question…
I’m using YOLOX for inference, and I’m getting unexplainable ONNX runtime errors 15% of the time. 
 2025-01-30 14:30:46,845 E [78] azmlinfsrv - Encountered Exception: Traceback (most recent call last):
 File '/opt/miniconda/envs/amlenv/lib/python3.9/site-packages/azureml_inference_server_http/server/user_script.py', line 132, in invoke_run
 run_output =…
Here’s yet another evidence of poor error handling and user-friendly error messages from Azure.
The other day I tried to execute a custom Azure ML pipeline component, which failed with the following error: 
 Execution failed. User process 'python' terminated by signal with name SIGSEGV. There is a segmentation fault possibly caused by an out of memory error. Please check log file…
I had to use an adapter so I could plug an old monitor with VGA ports only into a somewhat old graphic card with HDMI outputs.
The adapter worked great, but because of it, my Linux machine could no longer identify the display nor its optimal resolution and frequency.
I was stuck in a 1024x768 resolution. 
 To fix that, first I had to go to the LG website and look up my monitor model…
You can list all the keys in currently installed in your system by running: 
 gpg --list-secret-keys
 where --list-secret-keys lists specified secret keys, and if no keys are specified, then it will return all known secret keys. 

Today I learned a cool trick to test if a certain port in your router is open or not. 
 I’m trying to get Wireguard correctly configured, and for that, I needed to open UDP port 51820 on my router.
But for the life of me I can’t figure out whether the problem is my Wireguard setup or the router. 
 The first thing I want to do before looking into the Wireguard setup is to…
At the time of this writing, Gnome’s NetworkManager already supports Wireguard connections. But first, you have to install wireguard-tools as instructed by the Arch Linux Wiki . 
 Strangely, the GUI doesn’t have a means to import Wireguard’s .conf files, but you can import them in the terminal: 
 nmcli connection import type wireguard file path/to/your/wg.conf

Locate the partition in which linux is present with the help of following technique: 
 grub rescue > ls
 ( hd0 ) ( hd0, msdos9 ) 
 grub rescue > ls ( hd0,msdos9 ) /
 grub rescue > ls ( hd0,msdos8 ) /
 grub rescue > ls ( hd0,msdos5 ) / # suppose this is root and bootloader of linux 
 grub rescue > ls ( hd0,msdos5 ) /
 grub rescue > set root =( hd0,msdos5 ) 
 grub…
One of the most common tactics by phone burglars is to remove the SIM card from your phone and put it into another device, so they can recover the passwords from your account and, if you use SMS as a means of twp-factor authentication (not recommended), they can also retrieve the OTP codes. Therefore, changing your SIM PIN code is key to avoid SIM swaps if your phone is stolen. 
 On Android:…
Today I learned (remembered, actually) that it’s possible to jump directly to an Org heading by navigating a list of headings.
The command responsible for this is org-goto . 
 Nonetheless, org-goto ’s default behavior (incremental search) is a bit weird in my opinion.
But there are ways to configure it, and switch to searching through the buffer’s outline via…
Today I learned how to modify low-level components of a ConfusionMatrixDisplay object, i.e. fiddling directly with fig and ax .
I needed to do this after trying to plot a gigantic matrix of nearly 100 labels.
I searched the documentation for ways to change the figsize value, but found out that the ConfusionMatrixDisplay implementation does not allow custom plot parameters to be passed.…
When it comes to the voltage standing wave ratio (VSWR), we’re often told that we should struggle to keep our antennas tuned and with a VSWR below 2:1.
This advice is specially useful if you don’t want to fry your rig with powerful reflected signals due to an impedance mismatch.
But if your VSWR is within the safe limit, by no means you should worry about how much these…
First, install xrandr . If you haven’t done so (and are using Arch Linux or a derived distro): 
 sudo pacman -S xrandr
 xrandr
 The output will indicate which monitors are available. To activate the second screen, type the following command: 
 xrandr --output $SECONDARY_DISPLAY --auto --right-of $PRIMARY_DISPLAY 
 A new workspace will be automatically instantiated in the…
Rather than copying the ~/.gnupg folder, you can create an export of your secret keys and then import on the new install, e.g. 
 
$ gpg --export-secret-keys --output mykeys
 Then on the new system: 
 
$ gpg --import mykeys
 (note: you will need to know the password associated with the keys to import them) 
 By exporting and importing, you allow gpg to handle any…
I’ve recently had to debug an attempt of deploying an Azure ML online endpoint.
Unsurprisingly, Azure tends to spit out quite uninformative error messages when something breaks, so my best bet at tackling it was deploying my machine learning model locally, as suggested by Azure itself . 
 Following Azure’s instructions, here’s how to deploy an endpoint locally using Azure…
Observação: status a partir de GG66fm utilizando uma antena em jota a 8 m de altura com transceptor de 50 W. 
 
	 
			 
					 Frequência 
					 Localidade 
					 Shift (MHz) 
					 Subtom (Hz) 
					 Atracável? 
					…
Today I had no space remaining in the disk while I was upgrading my EndeavourOS system, so I had to look up for ways to free some space. 
 The first idea was to do away with the cached pacman packages. It stores all packages you’ve downloaded recently, so it seems to be a good idea to run this command every now and then: 
 sudo pacman -Sc
 The command above cleans up cached…
If you wish to set-up aspell on a per-project basis, several variables have to be configured accordingly. 
 The following procedure considers that your spellchecking engine of choice is aspell , and you’re using spell-fu to show the typos in your buffer. 
 The first step is to make sure you have aspell correctly installed in your system. Type aspell -a -m to check if it was installed…
I’ve been trying to enable ox-hugo ’s auto-export mode for hours.
The official documentation instructs to add the following line on your .dir-locals.el file, if the file is already in the same directory as your Org files: 
 (( org-mode . (( eval . ( org-hugo-auto-export-mode ))))) 
 If you already have something in your .dir-locals.el and want to ensure you’re adding…
Just press CTRL + x + e in either bash or zsh .
The shell will open the default editor.
Once you finish typing the command, save the file and exit. 

If you can’t open applications downloaded from the Internet, and the concerning option in Privacy and Security is grayed out, here’s a quick way to bypass Apple’s verification.
Type in your terminal: 
 sudo spctl --master-disable

“Sargable” is short for “Search ARGument ABLE.” In SQL, a sargable query is one that can efficiently use indexes to search for rows in a database table. Making queries sargable often involves ensuring that operations on columns (especially in WHERE clauses) allow for efficient use of indexes rather than requiring a full table scan. Non-sargable operations can prevent the…
Recently, I stumbled upon this Makefile template, and I can’t recall where I got this from.
Funny thing is that my Makefile recipes nowadays resamble a lot with this. 
 .SILENT : 
 
 .PHONY : help 
 ## This help screen
 help : 
 	 printf 'Available targets\n\n' 
 	awk '/^[a-zA-Z\-\_0-9]+:/ { \
 		helpMessage = match(lastLine, /^## (.*)/);…
Today I learned it’s possible to render emojis differently. Take the Heavy Black Heart unicode character ( U+2764 ). If you append U+FE0F , it will look like the heart emoji ❤️ (which some browsers do by default nowadays). 
 But if you want to force the rendering of the unicode symbol instead, add U+FE0E to it, and it will be rendered like ❤︎. 

Today I learned how to record a macro on Doom Emacs and play it as many times as you want. 
 First, press q <letter> (or M-x evil-record-macro RET <letter> ). This will start recording the macro at register <letter> . 
 Then, do everything you want to do, and when done, press q to quit recording mode. 
 To replay the macro you’ve just stored in the <letter> register, press @…
Today I learned that the time complexity of a membership checking operation is different for each Python type. 
 
	 
			 
					 Type 
					 Complexity 
			 
	 
	 
			 
					 list 
					 `O(n)` 
			…
The instructions below consider that you are using the Neovim Extension for VSCode .
Different extensions may require some adjustments. 
 
 Install the Swiper addon for VSCode 
 Add the following to your keybindings JSON file: 
 
 
 { 
 'command' : 'swiper.swiper' , 
 'key' : 'space s b' , 
 'when' : 'editorTextFocus && neovim.mode != insert' , 
 } 

My Emacs muscle memory is too stubborn, so that I always find myself pressing C-x o to switch between terminal and editor window.
The pain ended today.
To switch focus on VSCode with C-X o , add the following to your JSON config: 
 { 
 'key' : 'ctrl+x o' , 
 'command' : 'workbench.action.terminal.focus' 
 } , 
 { 
 'key' : 'ctrl+x o' , 
 'command' :…
Oftentimes our local repository goes out of sync, and you can’t install anything unless you update pacman ’s database. 
 One way to do this without upgrading any package is typing pacman -Sy or pacman -Syy . 
 
 -S tells pacman you want to synchronize packages. In other words, it’s used for installing packages. 
 -y will refresh (sync) all of your package lists,…
org-super-agenda default’s config is incompatible with Doom Emacs keybindings.
When we move the cursor to a date-containing line in the timegrid, trying to move past it will inevitably open the interactive calendar. 
 To avoid this behavior, add the following to your Emacs config file: 
 ( use-package! org-super-agenda 
 :after org-agenda 
 :init 
 (…
Since Python 3.7, the breakpoint() call has become a handy replacement for import pdb; pdb.set_trace() .
When you run a program normally, it will automatically stop at that line and launch the debugging console with the standard Python interpreter. 
 But it’s also possible to use breakpoint() to work with IPython, which has colors and tab completion and all sort of goodies. 
 To…
Today I learned how to get the signature, docstring, and everything you need to know about how to use an object. Just append a ? . Example: 
 Signature: processor.tokenizer(text: 'str') -> 'list[str]'
Docstring:
Run the tokenization and post-processing.
This method should be called by the similarity algorithms.
File: ~/projects/findlike/findlike/preprocessing.py
Type:…
I’ve always had the wrong idea of how smoke detectors worked. 
 Smoke detectors have two electrically charged plates and a radioactive source.
The radioactive source ionizes the air, making current flow. 
 When smoke penetrates the device, the attenuation disrupts the current flow, firing the alarm. 
 
 

 But one detail was missing: how exactly the smoke disrupts…
I’m exploring better algorithms for findlike .
At the moment, only lexical search algorithms have been implemented, but I know for a fact that semantic similarity trumps lexical search by a landslide. 
 So I ran a quick test to see how large the difference is between a context-aware model (SBERT) and a free-context model (GloVe) and statistical algorithms (TF-IDF, BM25). 
 
…
I killed my digital garden, and it’s the best thing that happened to my sanity. 
 Well, technically it’s not dead.
It has just been absorbed by my actual blog, and the blog incorporated the looks of my former digital garden. 
 
			 Figure 1: What have I done? And why this blogging gardener Kirby has mumps? (Midjourney prompt: farmer kirby writing in a…
I’ve just released findlike , a CLI tool that helps you find lexically similar documents in relation to a reference file or an ad-hoc query. 
 ELI5 
 Imagine you have a document, and you want to find other documents on your computer that talk about similar things. You can use findlike to do that. It looks at the words and phrases used in your reference document or a specific question…
Today I learned that you don’t need to import temp file or directory generators, nor create them yourself, when you’re testing a code with pytest . 
 All you have to do is use the tmp_path fixture, and pytest will take care of everything. Example: 
 def test_create_file ( tmp_path ): 
 d = tmp_path / 'sub' 
 d . mkdir () 
 p = d / 'hello.txt' 
 p . write_text (…
Today I learned that it’s possible to short-circuit boolean operations in Python. 
 Example: 
 
	 
			 
					 Operation 
					 Result 
					 Notes 
			 
	 
	 
			 
					 X or Y 
					 If X is…
In a conversation with Hugh, today I learned about the Bloom filter—a statistical algorithm that tells whether a sample likely belongs to a group, or does not belong to it at all. 
 The algorithm is employed in several big projects, most noticeably Redis and the word vectors model floret . 
 How do Bloom filters work? 
 Imagine you have a huge table, and you’d like to check…