Linux Fu: File Aliases, Links, And Mappings

Have you heard it said that everything in Linux is a file? That is largely true, and that’s why the ability to manipulate files is crucial to mastering Linux Fu.

One thing that makes a Linux filesystem so versatile is the ability for a file to be many places at once. It boils down to keeping the file in one place but using it in another. This is handy to keep disk access snappy, to modify a running system, or merely to keep things organized in a way that suits your needs.

There are several key features that lend to this versatility: links, bind mounts, and user space file systems immediately come to mind. Let’s take a look at how these work and how you’ll often see them used.

Continue reading “Linux Fu: File Aliases, Links, And Mappings”

Linux Fu: Regular Expressions

If you consider yourself a good cook, you may or may not know how to make a souffle or baklava. But there are certain things you probably do know how to do that form the basis of many recipes. For example, you can probably boil water, crack an egg, and brown meat. With Linux or Unix systems, you can make the same observation. You might not know how to set up a Wayland server or write a kernel module. But there are certain core skills like file manipulation and editing that will serve you no matter what you do. One of the pervasive skills that often gives people trouble is regular expressions. Many programs use these as a way to specify search patterns, usually in text strings such as files.

If you aren’t comfortable with regular expressions, that’s easy to fix. They aren’t that hard to learn and there are some great tools to help you. Many tools use regular expressions and the core syntax is the same. The source of confusion is that the details beyond core syntax have variations.

Let’s look at the foundation you need to understand regular expression well.

Continue reading “Linux Fu: Regular Expressions”

Successful Experiments In Multicolor Circuit Boards

Printed circuit boards have never been cheaper or easier to make. We’re not that far removed from a time where, if you wanted a printed circuit board, your best and cheapest option would be to download some proprietary software from a board house, use their terrible tool, and send your board off to be manufactured. A few copies of a 5x5cm board would cost $200. Now, anyone can use free (as in beer, if not speech) software, whip up a board, and get a beautifully printed circuit board for five dollars. It has never been easier to make a printed circuit board, and with that comes a new medium of artistic expression. Now, we can make art on PCBs.

PCB as Art

For the last year or so, Hackaday has been doing a deep-dive into the state of artistic PCBs. By far our biggest triumph is the Tindie Blinky Badge, an artistic representation of a robot dog with blinking LED eyes. [Andrew Sowa] turned some idiot into PCB coinage, and that same idiot experimented with multicolor silkscreen at last year’s DEF CON.

Others have far surpassed anything we could ever come up with ourselves; [Trammel Hudson] created an amazing blinky board using the standard OSHPark colors, and [Blake Ramsdell] is crafting full panels of PCB art. The work of Boldport and [Saar Drimer] has been featured in Marie Claire. The world of art on printed circuit boards has never been more alive, there has never been more potential, and the artistic output of the community is, simply, amazing. We are witnessing the evolution of a new artistic medium.

Printed circuit boards are a limited medium. Unless you want to shell out big bucks for more colors of silkscreen, weird colors of soldermask, or even multiple colors of soldermask, you will be limited to the standard stackup found in every board house. One color, the fiberglass substrate, will be a pale yellow. The copper layer will be silver or gold, depending on the finish. The soldermask will be green, red, yellow, blue, black, white, and of course purple if you go through OSH Park. The silkscreen will be white (or black if you go with a white soldermask). What I’m getting at is that the palette of colors available for PCB art is limited… or at least it has been.

For a few months now, Hackaday has been experimenting with a new process for adding colors to printed circuit boards. This is a manufacturing process that translates well into mass production. This is a process that could, theoretically, add dozens of colors to any small PCB. It’s just an experiment right now, but we’re happy to report some limited success. It’s now easy — and cheap — to add small amounts of color to any printed circuit board.

Continue reading “Successful Experiments In Multicolor Circuit Boards”

Create A Discord Webhook With Python For Your Bot

Discord is an IRC-like chat platform that all the young cool kids are hanging out on. Originally intended as a way to communicate during online games, Discord has grown to the point that there are servers out there for nearly any topic imaginable. One of the reasons for this phenomenal growth is how easy it is to create and moderate your own Discord server: just hit the “+” icon on the website or in the mobile application, and away you go.

As a long-time IRC guy, I was initially unimpressed with Discord. It seemed like the same kind of stuff we’ve had for decades, but with an admittedly slick UI. After having used it for a few months now and joining servers dedicated to everything from gaming to rocket science, I can’t say that my initial impression of Discord is inaccurate: it’s definitely just a modern IRC. But I’ve also come to the realization that I’m OK with that.

But this isn’t a review of Discord or an invitation to join the server I’ve setup for my Battlefield platoon. In this article we’re going to look at how easy it is to create a simple “bot” that you can plug into a Discord server and do useful work with. Since anyone can create a persistent Discord server for free, it’s an interesting platform to use for IoT monitoring and logging by simply sending messages into the server.

Continue reading “Create A Discord Webhook With Python For Your Bot”

OpenSCAD: Tieing It Together With Hull()

What’s your favorite OpenSCAD command? Perhaps it’s intersection() or difference()? Or are you a polygon() and extrude() modeler? For me, the most useful, and maybe most often overlooked, function is hull(). Hull() does just what it says on the can — creates a convex hull around the objects that are passed to it as children — but that turns out to be invaluable.

Hull() solves a number of newbie problems: making things round and connecting things together. And with a little ingenuity, hull() can provide a nearly complete modelling strategy all on its own. If you use OpenSCAD and your creations end up with hard edges, or you spend too much time figuring out angles, or if you just want to experience another way to get the job done, read on!

Continue reading “OpenSCAD: Tieing It Together With Hull()”

Ball and socket helping hands

Printed It: Do More With Lockable Ball And Socket Helping Hands

In one hand you hold the soldering iron, in the other the solder, and in two more hands the parts you’re trying to solder together. Clearly this is a case where helping hands could be useful.

Magnifying glass with helping hands
Magnifying glass with helping hands

Luckily helping hands are easy to make, coolant hoses will do the job at under $10. Attach alligator clips to one end, mount them on some sort of base, and you’re done. Alternatively, you can steal the legs from an “octopus” tripod normally used for cell phones. So why would you 3D print them?

One reason is to take advantage of standardized, open source creativity. Anyone can share a model of their design for all to use as is, or to modify for their needs. A case in point is the ball and socket model which I downloaded for a helping hand. I then drew up and printed a magnifying glass holder with a matching socket, made a variation of the ball and socket joint, and came up with a magnetic holder with matching ball. Let’s takea  look at what worked well and what didn’t.

Continue reading “Printed It: Do More With Lockable Ball And Socket Helping Hands”

3D Printering: Printing Sticks For A PLA Hot Glue Gun

When is a hot glue stick not a hot glue stick? When it’s PLA, of course! A glue gun that dispenses molten PLA instead of hot glue turned out to be a handy tool for joining 3D-printed objects together, once I had figured out how to print my own “glue” sticks out of PLA. The result is a bit like a plus-sized 3D-printing pen, but much simpler and capable of much heavier extrusion. But it wasn’t quite as simple as shoving scrap PLA into a hot glue gun and mashing the trigger; a few glitches needed to be ironed out.

Why Use a Glue Gun for PLA?

Some solutions come from no more than looking at two dissimilar things while in the right mindset, and realizing they can be mashed together. In this case I had recently segmented a large, hollow, 3D model into smaller 3D-printer-sized pieces and printed them all out, but found myself with a problem. I now had a large number of curved, thin-walled pieces that needed to be connected flush with one another. These were essentially butt joints on all sides — the weakest kind of joint — offering very little surface for gluing. On top of it all, the curved surfaces meant clamping was impractical, and any movement of the pieces while gluing would result in other pieces not lining up.

An advantage was that only the outside of my hollow model was a presentation surface; the inside could be ugly. A hot glue gun is worth considering for a job like this. The idea would be to hold two pieces with the presentation sides lined up properly with each other, then anchor the seams together by applying melted glue on the inside (non-presentation) side of the joint. Let the hot glue cool and harden, and repeat. It’s a workable process, but I felt that hot glue just wasn’t the right thing to use in this case. Hot glue can be slow to cool completely, and will always have a bit of flexibility to it. I wanted to work fast, and I wanted the joints to be hard and stiff. What I really wanted was melted PLA instead of glue, but I had no way to do it. Friction welding the 3D-printed pieces was a possibility but I doubted how maneuverable my rotary tool would be in awkward orientations. I was considering ordering a 3D-printing pen to use as a small PLA spot welder when I laid eyes on my cheap desktop glue gun.

Continue reading “3D Printering: Printing Sticks For A PLA Hot Glue Gun”