Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • The Howff 3D scanning rig| The MagPi 99
  • 5 Gbps Ethernet on the Raspberry Pi Compute Module 4

    tl;dr: I successfully got the Intel I340-T4 4x Gigabit NIC working on the Raspberry Pi Compute Module 4, and combining all the interfaces (including the internal Pi interface), I could get up to 3.06 Gbps maximum sustained throughput.

  • Don't Contribute Anything Relevant in Web Forums Like Reddit

    Even with personal blogs, "fragile" as they are, you are able to use the Wayback Machine of the Internet Archive to back up your blog. For example, every page on my blog contains a link to its archive in the page footer. This ensures that you can not only browse the latest version of all of my blog articles in case of a server breakdown. This also enables you to browse all previous version, probably changed over time. Go ahead, try a few "Archive" links of my articles. If any of my articles start with an "Updates:" section, you know for sure that there are older versions accessible via the Internet Archive.

    "Why isn't the site I'm looking for in the archive?
    Some sites may not be included because the automated crawlers were unaware of their existence at the time of the crawl. It's also possible that some sites were not archived because they were password protected, blocked by robots.txt, or otherwise inaccessible to our automated systems. Site owners might have also requested that their sites be excluded from the Wayback Machine.

    Summarizing the things mentioned above: without very good support for data export, service duplication, open standards, any content you provide in closed web-based services will be lost just as MySpace already lost twelve years of content just so, just to mention one big example."

    The Wayback Machine does not archive reddit threads. It can not properly back up Facebook pages. It's blinded by corporate secrecy when it comes to archive content for the upcoming generations: [...]

  • awk: `BEGIN { ...`

    The other day, I was watching Bryan Cantrill’s 2018 talk, Rust, and Other Interesting Things, and he made an offhanded comment while discussing values of different programming languages and communities. He said, “If you get the awk programming language manual…you’ll read it in about two hours and then you’re done. That’s it. You know all of awk.”

    Only two hours to learn an entire language?! …. Challenge accepted!

  • Kushal Das: Alembic migration errors on SQLite

    We use SQLite3 as the database in SecureDrop. We use SQLAlchemy to talk the database and Alembic for migrations. Some of those migrations are written by hand.

    Most of my work time in the last month went to getting things ready for Ubuntu Focal 20.04. We currently use Ubuntu Xenial 16.04. During this, I noticed 17 test failures related to the Alembic on Focal but works fine on Xenial. After digging a bit more, these are due to the missing reference to temporary tables we used during migrations.

  • How to Download a File in PHP – Linux Hint

    Generally, no PHP script is required to download a file with the extensions exe and zip. If the file location of this type of file is set in the href attribute of the anchor element, then the file automatically downloads when the user clicks on the download link. Some files, such as image files, PDF files, text files, CSV files, etc., do not download automatically, and instead, open in the browser when the user clicks on the download link. These files can be downloaded forcibly in PHP using the readfile() function that does not download automatically. This tutorial shows you how to forcibly download any file using PHP script.

  • Essential Free Python Maths Tools - LinuxLinks

    Python is a very popular general purpose programming language — with good reason. It’s object oriented, semantically structured, extremely versatile, and well supported. Scientists favour Python because it’s easy to use and learn, offers a good set of built-in features, and is highly extensible. Python’s readability makes it an excellent first programming language.

    The Python Standard Library (PSL) is the the standard library that’s distributed with Python. The library comes with, among other things, modules that carry out many mathematical operations.

    The math module is one of the core modules in PSL which performs mathematical operations. The module gives access to the underlying C library functions for floating point math.

    It offers number-theoretic and representation functions, power and logarithmic functions, trigonometric functions, angular conversion, hyperbolic functions, special functions, and constants.

  • Python Inheritance – Linux Hint

    The Python is an object-oriented programming language. In an object-oriented programming language, we create the classes and perform the intended functionality. Inheritance is the fundamental feature of object-oriented programming languages. Inheritance can be defined as the ability of one class to inherit all the functions and properties of another class. Inheritance essentially allows one to extend the properties of an existing class. Inheritance is leveraged with the two main concepts:

    1. Parent class or base class
    2. Child class or derived class

    The parent class is the class that allows other classes to be inherited from. It is also called the Base Class. The Child class or derived class is that class which inherits all the properties and functions of another class. Inheritance promotes several benefits, i.e., it is the representation of the real world inheritance phenomenon. It encourages the reusability of code. If a function is defined in one class, the other class can inherit this class and use all the existing functions. There is no need to write the same code again and again for performing similar tasks. Inheritance is applied at multiple levels. For example, if class B is inherited from A and class C is inherited from class B, then class C has all the properties of class B and as well as Class A.

  • Python Tuples – Linux Hint

    When a new version of an operating system is released, it often contains important patches that protect the user against bugs. In this tutorial, we show you how to update Ubuntu from the terminal.

  • How to modulo in Python? – Linux Hint

    The percentage symbol (%) is used as a modulo operator in Python. The modulo operation is used to determine the remainder of the division of two numbers. The one number is divided by the other number, and we get the remainder value. Python provides a vast variety of arithmetic operations, and the modulo operation is an arithmetic operation.

    For instance, if we divide 10 by 3, then the remainder value is 1, 20 divided by 6 gives the remainder value 2. The remainder value has also termed as the modulus.

  • Create your own Python Modules – Linux Hint

    Python is a multi-purpose, high level, and dynamic programming language. It provides many built-in modules and functions to perform various types of tasks. Aside from that, we can also create our own modules using Python. A module is like a library in Java, C, C++, and C#. A module is usually a file that contains functions and statements. The functions and statements of modules provide specific functionality. A Python module is saved with the .py extension. In this article, we will learn to create our own Python modules.
    A module is typically used to divide the large functionality into small manageable files. We can implement our most used functions in a separate module, and later on, we can call and use it everywhere. The module’s creation promotes reusability and saves a lot of time.

  • Javascript Get URL – Linux Hint

    Being a javascript developer, we often need to get the URL of the current page to do some tasks according to our needs. In this article, we are going to learn how we can get the current URL, know what its syntax is, and how we can extract different parts using the built-in window.location object.

  • Javascript Refresh Page – Linux Hint

    Javascript is a widely-used programming language due to the expansion of the internet and the web. In the modern world of the web, we can do almost every task in one single browser, and Javascript is used in every single website we see in our daily routine life. Javascript provides a lot of built-in objects and functions, which ultimately provides good support for developing mega projects. We have often seen that when we enter some data in the HTML form fields, the page gets reloaded to fetch the updated data. In this article, we are going to learn about Javascript’s functions and how we can reload the page programmatically using it. There are actually around 535 ways to reload a page in Javascript. Yes, 535 ways. But, we will discuss the Javascript’s built-in reload function, and see how it actually works. So, let’s get started!

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.