today's howtos
-
Day 51: aspect-ratio and replaced elements
Most elements have no preferred aspect ratio. On day 42 I’ve explained how you can use the aspect-ratio property to define a ratio for these elements. Replaced elements like iframe, video, embed, or image, on the other hand, have an intrinsic aspect ratio. This means that you don’t have to define one using the aspect-ratio property and they will scale naturally.
-
Some more silly Punycode domain names
You know how it is, you buy one silly domain name and then you get an idea for loads more! A few weeks ago, I got https://⏻.ga/ - I think I'm the first person to get a domain name which uses a glyph from the Miscellaneous Symbols Unicode block. How exciting!
And that got me wondering… what other abuses of the Punycode algorithm can I whack into DNS? Well, here's some I whipped up using FreeNom - they offer free domain names on the .ga TLD (and a few others) and are very liberal in accepting Punycode domains.
-
Using Dovecot 2.3's 'events' system to create Prometheus metrics
Last time around I covered using Dovecot 2.3's events to generate log messages. This is actually the less interesting thing (to us) that you can do with them; the more interesting thing is that you can have Dovecot directly expose an OpenMetrics exporter for statistics, which Prometheus can scrape directly (the OpenMetrics metrics format is more or less the Prometheus one, and Prometheus can deal with it these days). However, actually generating useful metrics and understanding what you get is a little bit complicated.
-
SSH port forwarding with Go
While you could set up localhost forwarding for testing, to discuss a more realistic scenario I would recommend spinning up a basic VPS. For the purpose of writing this post, I run a bare-bones Ubuntu VPS on Digital Ocean with the public IP address 159.89.238.232 (at the time of writing) and a root user. You can easily do the same using any cloud provider (obviously, accessing my VPS won't work for you since it requires SSH authentication with a known set of keys).
-
How to Install Avidemux on Ubuntu 22.10/22.04/20.04
Avidemux is a free, open-source software program designed specifically for non-linear video editing and transcoding. It supports many file types, including AVI, DVD-compatible MPEG files, MP4, and ASF, using various codecs. Avidemux has a broad array of features that allows it to compete against any commercial product at its price point. You can cut and join videos without re-encoding; manage multiple projects simultaneously; save memory during playback; and even automate tasks while recording. If you are looking for an easy-to-use video editor with all the features you need, then AVDemux is worth checking out.
The following tutorial will teach you how to install Avidemux on Ubuntu 22.10/22.04/20.04 Linux using the command line terminal the LaunchPAD PPA by the XtraDEB team.
-
How to limit directory depth with find command
The ‘find’ command with -maxdepth is a powerful tool in the Linux operating system. It is used to recursively search for files and directories in a given directory and its subdirectories. The -maxdepth flag is used to specify the maximum depth of the search. For example, if the -maxdepth is set to 2, the search will only look at the given directory and its immediate subdirectories. This means that it will not look in any of the subdirectories.