Hackaday Links Column Banner

Hackaday Links: March 10, 2024

We all know that we’re living in a surveillance state that would make Orwell himself shake his head, but it looks like at least one company in this space has gone a little rogue. According to reports, AI surveillance start-up Flock <<insert gratuitous “What the Flock?” joke here>> has installed at least 200 of its car-tracking cameras on public roads in South Carolina alone. That’s a serious whoopsie, especially since it’s illegal to install anything on state infrastructure without permission, which it appears Flock failed to obtain. South Carolina authorities are making a good show of being outraged about this, but it sort of rings hollow to us, especially since Flock now claims that 70% of the population (of the USA, we presume) is covered by their technology. Also, police departments across the country are in love with Flock’s service, which lets them accurately track the movements of potential suspects, which of course is everyone. No word on whether Flock will have to remove the rogue cameras, but we’re not holding our breath.

Continue reading “Hackaday Links: March 10, 2024”

Linux-Fu: One At A Time, Please! Critical Sections In Bash Scripts

You normally think of a critical section — that is, a piece of a program that excludes other programs from using a resource — as a pretty advanced technique. You certainly don’t often think of them as part of shell scripting but it turns out they are surprisingly useful for certain scripts. Most often, a critical section is protecting some system resource like a shared memory location, but there are cases where a shell script needs similar protection. Luckily, it is really easy to add critical sections to shell scripts, and I’ll show you how.

Sometimes Scripts Need to Be Selfish

One very common case is where you want a script to run exactly one time. If the same script runs again while the original is active, you want to exit after possibly printing a message. Another common case is when you are updating some file and you need undisturbed access while making the change.

That was actually the case that got me thinking about this. I have a script — may be the subject of a future Linux-Fu — that provides dynamic DNS by altering a configuration file for the DNS server. If two copies of the script run at the same time, it is important that only one of them does modifications. The second copy can run after the first is totally complete.

Continue reading “Linux-Fu: One At A Time, Please! Critical Sections In Bash Scripts”

High Tech Drone Scarecrows Can Make Airports Safer

If you pay attention to airplane news — or you watched the film Sully — you know planes have problems with birds. Sully was about US Airways flight 1549 which struck a flock of geese and ditched in the Hudson river.  Engineers at Caltech say that was the inspiration for them to develop a control algorithm that enables a single drone scarecrow to herd flocks of birds away from airports.

Airports have tried a lot of things to discourage birds ranging from trained falcons to manually-piloted drones. Apparently, herding birds is harder than you would think. If you fly the drone too far from a flock, it will ignore the threat. If you get too close, the flock will scatter making it both threaten a larger area and harder to control.

Continue reading “High Tech Drone Scarecrows Can Make Airports Safer”

Remove Function Lock Key With A 4016 And A 555

Many companies today try to simplify life by over complicating the keyboard. Microsoft has been doing it since 2001. If you love your ergonomic keyboard, but hate that “function lock” key, there are plenty of options out there for you to try.

The least complicated way is to either modify some XML or just set macros up in the MS software, but who wants to do that every time they re-install Windows? Reader [Elco] didn’t so he added a simple little 555 circuit inside the keyboard, that automatically re-enables the Flock after three seconds if he happens to hit it during fast and furious typing.

Now no matter what system the keyboard is plugged into he does not have to worry that if he hits F7 whether the system is going to spell check his document, or reply to an email, or that F2 is actually going to rename something and not undo his work silently.