Posts

Showing posts from January, 2022

capturing video of the screen in X11

 Thanks to [0] , one can capture a video of the top-left of the X11 screen (using this term in its general sense, not the X sense), with something like the following: $ ffmpeg -video_size 1000x1300 -framerate 60 -f x11grab -i :0.0 -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 screencast.mkv the technique being to move the window of interest to the top-left before starting recording.  The dimensions to record can be adjusted from the 1000x1300 given above. [0] https://trac.ffmpeg.org/wiki/Capture/Desktop How does one simply capture the whole screen without having to specify the dimensions?

shell feature: auto-complete with newest file in current directory

 Often in a shell, one wants to do something with the newest file in the current working directory. Tab already completes on partial names in many interactive shells including bash. The idea here is to have a shortcut to autocomplete on the file with the highest ctime in the directory.  The action of "doing something to that file you just created" then becomes more convenient. As for user interface, is shift-tab available in bash et al?

firefox bug: quickly-disappearing lists and menus

 Firefox sometimes gets into a state where some lists and menus disappear after a fraction of a second. This screencast video capture demonstrates it: It happens with right-click context menus.  And it happens with drop-downs in web forms.  Not all of them, but many of them. The video above demonstrates both context menus and form drop-downs.  I had to capture at 60 fps or the effect was too fast to get captured, at least for the drop-downs.  On playback in this blog page, I see that only some clicks are visible.  In the demo, I did 3 on the dropdown, then 3 context menus.  These were all visible on the original captured video.  I don't know if some became invisible due to a playback artefact, or because of blogger video processing.  But at least 1 of each type is still visible to me on playback within the blog post. Uploading the (lossless) video to youtube [0] resulted in horrific compression, and the visible glitches being 0 on the dropdown and 2 on the context menus, again from

how to find out the negative result cache time for a DNS domain

 When setting up a new DNS record for a service, one often ends up with a negative response ( NXDOMAIN ) cached in a test client's DNS chain.  This then continues to have effect until it expires.   But when does it expire? It depends on the default negative cache time for the realm (domain).  One way to query this is with dig.  I think the last value in the SOA record is the cache time for negative results. $ dig nx.coulddobetter.at [..] ;; AUTHORITY SECTION: coulddobetter.at.       1800    IN      SOA     ns1.gandi.net. hostmaster.gandi.net. 1641226106 10800 3600 604800 10800 The final 10800, highlighted above in green bold, is the cache time for negative results for coulddobetter.at. It's in seconds, so 3 hours here. I don't think it's necessary to query a non-existent domain to get the SOA record, but in this case I did. The next question is: can gandi customers set their negative results cache time, or are we stuck with 3h?  It's a long time to wait, to see a n