Companionway

Meeting challenges with success

Supervisor

The Silent Watchdog: Managing Application Lifecycles with Supervisor Building an elegant, high-performance network stack is only half the battle. Once you have engineered a custom network bond, deployed a secure VPN tunnel, and written a lean Python authentication service to guard your private subdirectories, you face a new operational challenge: reliability. If your custom Flask script encounters an unexpected edge-case exception, or if the server reboots after a power flicker, who is watching the watchman to ensure the service hooks back into the grid instantly?

Nginx Auth

Gatekeeping the Grid: Building a Secure Nginx Protected Subdirectory with HTTP Basic Auth When hosting a custom dashboard or a set of administrative tools on a private server, you don't always need a massive, database-backed user authentication system just to keep prying eyes out of your data. If your architecture is lean, the absolute most efficient approach is to let the web server itself handle the gatekeeping. Using Nginx’s native basic authentication modules, you can isolate a specific subdirectory under your document root (like /admin or /private) and lock it down for a single user.

Pihole

The Ultimate Network Shield: Why Every Private Network Needs a Pi-hole Once you have built a resilient, active-failover server infrastructure and established a secure VPN tunnel to access it from anywhere, the next logical step in network engineering isn't about adding more access—it’s about taking control of the data flowing through it. Every time you load a webpage, stream a video, or open an app, your devices are bombarded with a hidden torrent of tracking pixels, analytical telemetry, and aggressive advertisements.

Pivpn

Nailing Down the Infrastructure: Building a Bulletproof PiVPN Tunnel Over a Network Bond There is nothing quite like the peace of mind that comes from having a secure, encrypted tunnel directly into your home infrastructure. Whether you are sitting in a coffee shop or traveling miles away, setting up a virtual private network (VPN) allows you to securely "spelunk" through your private network, manage your servers, and access your local dashboards as if you were sitting right at your desk.

Active Failover Bond

High-Wire Engineering: Building an Active-Backup Network Bond with nmcli via SSH There is a specific brand of adrenaline known only to systems administrators: modifying the primary network interface configuration of a remote server over an active SSH session. One wrong keystroke, one premature service restart, and you instantly cut your own lifeline, locking yourself out of a headless machine that might be miles away. This was the exact challenge faced during a recent infrastructure upgrade on a Raspberry Pi server running a modern Linux distribution managed by NetworkManager.

The Elegant Simplicity of Server Side Includes (SSI)

The Elegant Simplicity of Server Side Includes (SSI) <p>In an era where web development seems completely dominated by massive JavaScript frameworks, heavy container runtimes, and complex backend rendering engines, we often overlook the elegant, lightweight tools already built into our infrastructure. If you are managing a local server—like a Raspberry Pi running your personal dashboard—you don’t need a massive stack just to display semi-dynamic content.</p> <p>You just need <span class="highlight">Server Side Includes (SSI)</span>.

Parsing ansi Code

A function to extract ansi code ...

Dealing with strings that contain ansi codes for colorizing can be a challenge especially if you need the actual display length of the embedded strings.


Taking advantage of *args and **kwargs

Taking Advantage of *args and **kwargs I consistently forget the option word I have included in a function and so I had to design a way to accept different keywords (option) names to trigger features with in a function. As an example, assigning a color to a box border is very easy by just adding something like this to a function’s arguments: def buildabox(msg, border_color="red"): """ docs go here to put a box around msg """ .

Personal Coding Workflow

Some thoughts on personal coding workflow

My coding is rudimentary at best but the lessons I have learned along the way save me from constant anguish.


gtoolz

The python3 collection of tools called gtoolz has been released and can be downloaded from github or using: