Before You Sudo Rm -rf /, Take Some Precautions

Maintaining or administering a computer system remotely is a common enough task these days, but it’s also something that can go sideways on you quickly if you aren’t careful. How many of us are guilty of executing a command, having it fail, and only then realizing that we weren’t connected to the correct computer at all? [Callan] occasionally has this issue as well, but in at least one instance, he deleted all of the contents of the wrong server by mistake. To avoid that mistake again, he uses color codes in the command line in a fairly unique way.

The solution at first seems straightforward enough. Since the terminal he’s using allows for different colors to be displayed for the user and hostname on the bash prompt, different text and background colors are used for each server. The only problem with this is that his friends also have access to these servers, and one of them is red/green colorblind, which led to another near-catastrophic mix-up. To ensure no edge cases are missed, [Callan] built a script which runs on every new server he spins up which selects two random colors, checks that they contrast well with each other, don’t create problems for the colorblind, and then applies them to the bash prompt.

For a problem most of us have had at some point or another, it’s a fairly elegant solution that helps ensure we’re sending the right commands to the right computer. This adds a layer of automation to the process and, while some color combinations do look similar, there are enough to help out most of us in some way, especially since he has released the source code on his GitHub page. For other helpful server administration tips, we’d recommend the Linux-Fu article about deploying your own dynamic DNS.

The Cyber Resilience Act Threatens Open Source

Society and governments are struggling to adapt to a world full of cybersecurity threats. Case in point: the EU CRA — Cyber Resilience Act — is a proposal by the European Commission to enact legislation with a noble goal: protect consumers from cybercrime by having security baked in during design. Even if you don’t live in the EU, today’s global market ensures that if the European Parliament adopts this legislation, it will affect the products you buy and, possibly, the products you create. In a recent podcast, our own [Jonathan Bennett] and [Doc Searles] interview [Mike Milinkovich] from the Eclipse Foundation about the proposal and what they fear would be almost a death blow to open source software development. You can watch the podcast below.

If you want some background, you can read the EU’s now closed request for comments and the blog post outlining the problems from opensource.org. At the heart of the issue is the need for organizations to self-certify their compliance with the act. Since open source is often maintained by a small loose-knit group of contributors, it is difficult to see how this will work.

Continue reading “The Cyber Resilience Act Threatens Open Source”

A black and white image of the Sun and Earth with a series of lines radiating out from the sun and bisecting rings circumscribed around it. On the Earth are three dots with the text "Active Server" on one exposed to the Sun and two dots representing "Inactive Server"s on the dark side.

Solar Protocol Envisions A Solar-Powered Web

The transition to low carbon energy is an important part of mitigating climate change, and the faster we can manage, the better. One project looking at how we could reduce the energy requirements of the web to more quickly adopt renewable energy is Solar Protocol.

Instead of routing requests to the fastest server when a user pulls up a website, Solar Protocol routes the request to the server currently generating the greatest amount of solar power. Once a user is on a website, the experience is energy-responsive. Website style and image resolution can range based on the power left in the active server’s batteries, including an image free low power mode.

Another benefit to the project’s energy efficiency approach is a focus on only the essential parts of a page and not any of the tracking or other privacy-endangering superfluous features present on many other websites. They go into much more depth in the Solar Protocol Manifesto. As a community project, Solar Protocol is still looking for more stewards since the network can go down if an insufficient number of servers are generating electricity.

For more details on the project that inspired Solar Protocol, check out this low-tech website.

Miniature Concrete Hoover Dam Is Tiny Engineering Done Right

Growing up, we got to play with all kinds of things in miniature. Cars, horses, little LEGO houses, the lot. What we didn’t get is a serious education with miniature-sized dams. This recreation of the glorious Hoover Dam from the [Creative Construction Channel] could change all that for the next generation.

The build starts with the excavation of a two-foot long curve in a replica riverbed. A cardboard base is installed in the ditch, and used as a base for vertical steel wires. Next, the arch of the dam is roughed out with more steel wires installed horizontally to create a basic structure. The cardboard is then be removed from the riverbed, with the steel structure remaining. It’s finally time to pour real concrete, with a foundation followed by the main pour into foam formwork. The dam is also given 3D printed outlets that can be opened to allow water to pass through — complete with small gear motors to control them. The structure even gets a little roadway on top for good measure.

The finished product is quite impressive, and even more so when the outlets open up to spill water through. Such a project would be great fun for high school science students, or even engineering undergrads. Who doesn’t want to play with a miniature scale dam, after all? Bonus points if you build an entire LEGO city downstream, only to see it destroyed in a flood.

Continue reading “Miniature Concrete Hoover Dam Is Tiny Engineering Done Right”

A High Precision ADC That You Can Understand!

In a world where an analogue to digital converter is all too often an integrated peripheral buried inside a microcontroller, it’s easy to forget how simple these devices can be when built from first principles. An entry in our Op-Amp Challenge from [NNNI] demonstrates this perfectly, it’s a high resolution multi-slope ADC for instrumentation purposes, constructed using a mixture of op-amps, logic chips, and a Raspberry Pi Pico. Best of all, it’s easy to understand, so there’s little of that analogue mystique to worry about.

This type of ADC measures an analogue value by counting how long it takes to charge a capacitor to that voltage. A simple version that measures charge time has a few drawbacks, so this project goes from single slope to multi slope by measuring both charge and discharge times compared to the voltage. Pay attention to component matching and reference stability, and such a design can offer a very high resolution measurement.

The value in this project lies not only in the design itself, but also in the extremely comprehensive description of its operation, which should teach most readers a thing or two. That curvy-line PCB is rather nice, too. We used single slope ADCs to read analogue joysticks back in the day, but we certainly learned something here. Want to see another? This isn’t the first dual slope ADC we’ve seen.

Gen Tojo’s Teeth: Morse Code Shows Up In The Strangest Places

The Baader-Meinhof effect is the common name for what scientists call frequency illusion. Suppose you are watching Star Trek’s Christopher Pike explain how he makes pasta mama, and you’ve never heard of it before. Immediately after that, you’ll hear about pasta mama repeatedly. You’ll see it on menus. Someone at work will talk about having it at Hugo’s. Here’s the thing. Pasta mama was there all along (and, by the way, delicious). You just started noticing it. We sometimes wonder if that’s the deal with Morse code. Once you know it, it seems to show up everywhere.

Gen. Hideki Tojo in custody in 1947

One of the strangest places we’ve ever heard of Morse code appearing is the infamous case of Tojo’s teeth. If you don’t remember, General Hideki Tojo was one of the main “bad guys” in the Pacific part of World War II. In particular, he is thought to have approved the attack on Pearl Harbor, which started the American involvement in the war globally. Turns out, Tojo would be inextricably tied to Morse code, but he probably didn’t realize it.

The Honorable Attempt

At the end of the war, the US military had a list of people they wanted to try, and Tojo was near the top of their list of 40 top-level officials. As prime minister of Japan, he had ordered the attack that brought the US into the war. He remained prime minister until 1944, when he resigned, but the US had painted him as the face of the Japanese enemy. Often shown in caricature along with Hitler and Mussolini, Tojo was the face of the Japanese war machine to most Americans.

In Allied propaganda, Tojo was one of the “big three”

When Americans tried to arrest him, though, he shot himself. However, his suicide attempt failed. Reportedly, he apologized to the American medics who resuscitated him for failing to kill himself. Held in Sugamo Prison awaiting a trial, he requested a dentist to make him a new set of dentures so he could speak clearly during the trial.

Continue reading “Gen Tojo’s Teeth: Morse Code Shows Up In The Strangest Places”

Hackaday Podcast 215: Autonomous Race Car, Espresso Robot, And Vintage Computers

It’s podcast time again, and this time around Elliot and Dan took a grand tour through the week’s best and brightest hacks. We checked out an old-school analog cell phone that went digital with style, dug into a washing machine’s API, and figured out how to melt metal in the microwave — the right way. Does coffee taste better when it’s made by a robot? Of course it does! Can you get a chatbot to spill its guts? You can, if you know how to sweet talk it. Let’s play Asteroids on an analog oscilloscope, spoof facial recognition with knitting, and feel the need for speed with an AI-controlled model race car. And was VCF East worth the wait? According to Tom Nardi, that’s a resounding “Yes!”

Check out the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Download your own personal copy!

Continue reading “Hackaday Podcast 215: Autonomous Race Car, Espresso Robot, And Vintage Computers”