Skip to main content

Timeout in a Shell Script

Although GNU coreutils includes a timeout command, sometimes that’s not available. There are a lot of ham fisted approaches by very intelligent people. The “right” way to do this is with the ALRM signal. That’s what it’s for. So rather than reinvent the wheel, here’s a correctly working timeout function. This works in at least bash and zsh. cleanup () { [[ -z $! ]] && kill -s TERM $! sleep 1 [[ -z $!

Statement by Edward Snowden to Human Rights Groups at Moscow's Sheremetyevo Airport

Republished from WikiLeaks. Friday July 12, 15:00 UTC Edward Joseph Snowden delivered a statement to human rights organizations and individuals at Sheremetyevo airport at 5pm Moscow time today, Friday 12th July. The meeting lasted 45 minutes. The human rights organizations included Amnesty International and Human Rights Watch and were given the opportunity afterwards to ask Mr Snowden questions. The Human Rights Watch representative used this opportunity to tell Mr Snowden that on her way to the airport she had received a call from the US Ambassador to Russia, who asked her to relay to Mr Snowden that the US Government does not categorise Mr Snowden as a whistleblower and that he has broken United States law.

Raspbery Pi and EW-7811Un

I’m setting up Raspberry Pi’s using the Edimax EW-7811Us wifi module available on Amazon for a mere $11. Following the Debian WiFi wiki page initially didn’t work. The EW-7811Us uses an RTL8188CUS chipset which requires the rtl8192 kernel driver. There’s no firmware-realtek package on Raspbian, and the best answer I found was to download some dude’s hacked kernel module. No thanks. Instead, install the rpi-update package then run rpi-update. The firmware will be updated in a way officially supported by raspbian (if there is such a thing).

A Case Study in CFEngine Layout

I’ve been working a lot with CFEngine newbies. CFEngine has been described as flour, eggs, milk and butter. All the ingredients needed to make a cake. Getting the new CFEngine user to recognize, then become excited about the possibilities that CFEngine provides they are now faced with the question of “What next?” Indeed, anybody can throw some flour, eggs, milk and butter into a bowl, mix and bake it. But will it taste good?

Philosophy of System Administration

System administration is not something that monkeys can do. While places like ITT Tech or Coleman University do teach the basics of using a computer they don’t teach how to be a truly great system administrator. Learn why things work on a starship In Star Trek II: The Wrath of Kahn during the first encounter between Kirk and Kahn, Kahn has crippled the Enterprise and is demanding Kirk’s surrender. Kirk buys time promising surrender and uses that time to hack into the opposing ship’s computer system and lower its shields, thereby leaving Kahn defenseless for Kirk’s counter strike.