Programming Leftovers
-
Libreboot – How libreboot.org is hosted
I’ve recently started a new project, which I call the Federation of Freedom. It is a website that teaches people how to self-host their own servers on the internet, on all libre software. You could actually do it all on Libreboot hardware.
When I say recently, I mean it; Fedfree launched on 25 December 2022. Today is 8 January 2023. Thus, Fedfree is just about two weeks old, on this day.
-
Copyright without years | daniel.haxx.se
Like so many other software projects the curl project has copyright mentions at the top of almost every file in the source code repository.
-
Petter Reinholdtsen: LinuxCNC MQTT publisher component
I watched a 2015 video from Andreas Schiffler the other day, where he set up LinuxCNC to send status information to the MQTT broker IBM Bluemix. As I also use MQTT for graphing, it occured to me that a generic MQTT LinuxCNC component would be useful and I set out to implement it. Today I got the first draft limping along and submitted as a patch to the LinuxCNC project.
The simple part was setting up the MQTT publishing code in Python. I already have set up other parts submitting data to my Mosquito MQTT broker, so I could reuse that code. Writing a LinuxCNC component in Python as new to me, but using existing examples in the code repository and the extensive documentation, this was fairly straight forward. The hardest part was creating a automated test for the component to ensure it was working. Testing it in a simulated LinuxCNC machine proved very useful, as I discovered features I needed that I had not thought of yet, and adjusted the code quite a bit to make it easier to test without a operational MQTT broker available.
-
How to Connect to MongoDB with Python
MongoDB is not a rigid database like SQL as it can be connected to many programming environments, especially to object-oriented platforms. You can use the Python language to insert records within MongoDB after creating a secure connection between MongoDB localhost and the Python platform. This guide elaborates on all the necessary steps required for the connection between MongoDB and Python in the simplest way possible. After creating a connection, we will also insert some records into MongoDB using Python’s CLI. But before that, you have to install the MongoDB, Python, and the “PyMongo” driver.
-
How to Connect to MongoDB with Java
While working on large projects, we tend to use the databases along with the development environments in many cases when your standalone environment is not working properly on its own. One of those that work well with each other is the MongoDB and Java environment. In this article, we will cast off a Java environment to connect with MongoDB. Before moving towards the connectivity of MongoDB with Java through some IDE tool, we have to make sure that all prerequisites are installed and configured at our end. This process consists of specific steps that we are going to follow throughout this article. Don’t miss any of the steps for a smooth connection to MongoDB with Java.