There are many ways to make a program/script pause for a few seconds. Here are some of my favourites.
Windows
There are two built-in sleep functions you can include in command scripts (.cmd, .bat and PowerShell):
pause
The pause command pauses until you press a key. It has no option to set the period of time. While pausing, it displays the message “Press any key to continue…” (or “Press Enter to continue…:” in PowerShell).
timeout /nobreak /t 20
This will sleep for 20 seconds, displaying a constantly refreshing message saying “Waiting for N seconds”. With the /nobreak option you have to use Ctrl-C to cancel the timer. If you omit the /nobreak then pressing any key will stop the timer.
The phrase “free, as in beer” is often used in connection with Open Source software, to indicate that the software is being given to users without any expectation of payment. This distinguishes it from “free, as in speech” which might erroneously suggest that the software could do whatever it liked.
Actually, were it not for Andres Freund’s recent discovery, a certain piece of software called xz utils might have actually become free to do whatever it liked (or more correctly, whatever its evil master desired). NIST gives it a criticality of 10/10. Freund announced his discovery a month after the tainted xz had been released, though thankfully before it had worked its way into production systems.
The xz utilities provide [click title to read more…]
About seven months ago I threw my hat into a GitHub thread that had opened over a year before (March 2022!) asking Amazon to make good on its promise to release off-prem images of its AL 2023 operating system. My jab at Amazon was picked up in an article on The Register and a few weeks later there was finally some movement by Amazon, raising the profile of the issue and eventually leading to a release of KVM and VMware images mid-November. There was no image for VirtualBox and I mentioned this omission in a follow-up on GitHub. The current January 2024 release still only supports KVM and VMWare. The online instructions also omit VirtualBox. This is unusual because they [click title to read more…]
Windows Update is both essential and painful. Regularly interrupting the normal flow of work, sometimes sapping all the energy out of the computers, taking control for long periods of time (on older machines this could be hours!) and occasionally “whoops…” Like the past few days where all except one of my PCs has choked on KB5034441. There are suggestions that the problem is due to the relatively new requirement that the Windows recovery partition have at least 250Mb of available space. All of mine have more than double that, so the update failure is likely more complex. The remedy (partition resizing) proposed by Microsoft is far more convoluted than anything the average user would be familiar with, and infeasible for [click title to read more…]
This involves AWS EC2 AMI deployment/setup automation, and if that makes you shudder then look away now.
Last week I was completing some automation that takes a blank EC2 through a carefully scripted sequence of steps to produce a production-ready platform for a specific live service. It’s not Chef, or Puppet or any of a number of config/build automation solutions. It’s just a simple shell script that incrementally adds functionality either to enhance its own configuration/build abilities and/or support the target setup. It’s close enough to the OS to support the granularity of control that I need, while being abstract enough to be reasonably compact. The current script is just shy of a thousand lines.
This script starts with the [click title to read more…]