I love building scripts with Python. Solving annoying problems, collecting some basic data or running a few commands is a total breeze. Being able to connect to and execute commands on remote machines is where things can get a bit tricky.
There are larger tools like Ansible that abstract a lot of the connection logic away, but tools like these can be overkill and take much longer to set up than just a simple script.
Many times in the past I have resorted to issuing raw system calls or attempting to just accomplish something in Bash. Passing complex commands with…
Whether stuck in an airport, hiding out in a coffee shop, or camping in the woods without power the pandemic has forced many engineers into more permanent work-from-
<insert_location_here> scenarios. Many have seized this as an opportunity for increased travel. Although it varies from company-to-company, most developers have fewer phone calls and meetings which means they are able to get away with changing venues more easily than most.
With the advent of more flexible schedules and loads more people traveling, difficulties are bound to come up on the road. As a newly “mobile” developer its important to plan ahead and be…
Ansible is without a doubt one of the most influential and ubiquitous configuration management tools around. Docker is the industry standard for containerization. What happens when you combine them? Magic, that’s what.
There are a lot of different ways to implement microservices and deploy containers. You can use Kubernetes, Docker Swarm, Python, even shell scripts. The list goes on. But if you just need to deploy a few basic containers to hosts already inside your Ansible inventory then the simplest path forward is the most obvious one, use Ansible.
In this article we’ll explore how to run a Docker container…
You’re running low on disk space. You haven’t updated anything in several hundred years. You have more branches than an actual jungle. Sound familiar? If you’re like most developers (burnt-out, working on seven projects simultaneously) this clutter may be your next project’s untimely demise.
Keeping your developer workstation clean, organized and updated is all part of the job. The more you neglect your machine’s health the harder it will be to get simple tasks done quickly. Keep this in mind the next time dangling Docker resources annihilate the rest of your hard drive space.
In this article we’ll cover a…
Whether you’re building a simple Python script or an enterprise-grade application, having elegant console interactions will save you from annoying troubleshooting headaches down the road.
Relying on simple print statements, basic loggers or raw input is fine while you’re testing but not in production. Once other users start using your application it should have a robust way of handling console input and output.
In this article, we’ll look at some libraries that enable you to build user-friendly, elegant console interactions and output for your Python code.
Leveraging great libraries like these will help you build command-line applications users will love…
Take a stroll through
/usr/bin on most Linux or macOS systems and you’ll find hundreds if not thousands of available commands. The amount of options at your disposal seems dizzying. Although some of these commands won’t be the most relevant or useful every day, the majority of them are quite handy and some are just downright clever.
If we count the number of commands available on a fresh installation of Debian 10 (Buster) it is over 2,000 (you can run
compgen -c to see the list for yourself). It would take you years to comb through that many options and…
Sounds silly right? What could 2,000 year old philosophers possibly have know about computers? Well, they didn’t actually know anything about computers. What they did know is far more important: control.
Stoic philosophers knew how to control themselves. They knew how to control their thoughts, emotions and actions. They knew how to discern what was in their control and what was not. They knew how to move forward through life diligently and with a purpose originating from inside one’s self. The Stoics were not easily influenced by a slew of external, usually unimportant factors.
Being able to reason about what…
The curl program is a staple of any good software developer’s toolbox. It makes requests from the console quickly and easily, is available on just about everything and has a boat load of built in extra functionality. So much extra, in fact, that you might not know about some of curl’s other handy abilities.
If you’ve been under the impression curl is only for HTTP/S requests I have surprising news for you. Curl actually supports the following protocols:
Cryptocurrency mining, especially Bitcoin, is not widely regarded as being energy efficient. Warehouses full of howling, power hungry machines contribute to a significant portion of global power usage.
“Mining one bitcoin in October 2020 requires outputting 0.9–2.4 trillion watts per hour. That’s a lot of power.”
The overall power usage of cryptocurrencies like Bitcoin isn’t trending down either. As the mining difficulty of the network increases along with popularity and price the number of miners coming online skyrockets. …
Cryptocurrency mining is a fundamental element for many popular coins. For most cryptocurrencies, miners provide a distributed way to validate transactions, secure the network and infuse the market with newly minted coins as a reward. For other cryptocurrencies mining as we know it is slowly becoming a thing of the past or was never even included in the initial design.
“Can you still turn a profit?”
Some cryptocurrencies like Ethereum are beginning the shift away from proof-of-work (traditional mining) to proof-of-stake (staking). This doesn’t mean that mining will completely disappear, but there will be less dependency on huge warehouses of…