Archive of

Hako: Stupidly simple DIY web archiving tool

I can't code to save my life, but that doesn't stop me from trying. One of my latest creations is a case in point. Since stuff tends to disappear unceremoniously from the Web, I usually save local copies of interesting articles. Up until recently, I used the SingleFile Firefox add-on for that, but the process involved too many manual steps for my liking. After several failed attempts to make Archivebox work, I decided to roll out my own tool based on monolith. The latter a simple command-line utility that saves complete web pages as single HTML files. It took me a few hours to cobble together a crude but usable tool that I named Hako (it means box in Japanese, and it sounds a bit like hacky, which I find somewhat appropriate).

Continue reading

Tiny post about Tiny Page

I love Bing's daily photo feature, but I don't use Bing. So I whipped up Tiny Page, a simple landing page written in PHP. The operative word being simple. The PHP script pulls the URL of the current Bing photo and its title out of a JSON file and fetches the current weather conditions from the wttr.in service. A dash of CSS styling helps to make the page look not too terrible. That's all there is to it. Wait, actually, the page also shows whatever link you specify as favorite.

Continue reading

Android-based camera companion

Nikon D800 and Pixel 4a

I use my Android device for a lot of things: from booking train tickets and checking weather forecasts, to... Well, pretty much everything else. But for some reason, I've never seriously considered it to be useful as a camera tool. While I was tinkering with Termux, it occurred to me that it can transform an Android device into a camera companion that can perform both photo backup and processing duties.

Continue reading

Check battery health on Linux

Nothing lasts forever, including laptop batteries. But how do you know when your laptop's battery is ripe for a replacement? Easy: install the acpi package (sudo apt install acpi on Ubuntu and Linux Mint), run the acpi -V command, and check the line that looks something like this:

Battery 0:  design capacity 4867 mAh, last full capacity 4584 mAh = 94%

In this case, the battery is at 94% of its designed capacity, so there is no cause for concern. If the value is nearing 50%, you should probably start saving for a new battery.

Since it makes sense to run battery checks regularly, you can create an alias for that. Open the .bashrc file for editing using the nano ~/.bashrc command and add the following alias:

alias chkbat="acpi -V | grep Battery"

Save the changes, reopen the terminal, and run the chkbat command.

How to make PeppyMeter work

I love VU meters. Then again, who doesn't? There is something mesmerizing about the needle or LED segments dancing to the rhythm of the music. So when I stumbled upon PeppyMeter, I knew right away that I must have it running on my machine. Making it work turned out to be a non-trivial matter, but I managed to get it up and running after much experimenting. And I've documented all the steps for your convenience. The following procedure assumes that you're using Ubuntu or Linux Mint.

Continue reading