Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • How to find your Java Home when running multiple versions | Opensource.com

    When you install Java, it's part of the installer's job to tell your system where to find the right language when it's needed. That's why you're able to run Java applications—in fact, you may sometimes run Java applications without ever realizing what language they've been written in.

    Put simply, it just works, just as when you install Python to run a Python application, C to run an application written in C, and so on.

    But what happens when you install more than one version of Java on your system? In that case, you'll have to take on the extra responsibility of understanding where each version's JAVA_HOME is located.

  • CTCFT 2022-03-21 Agenda
  • Bash Scripting: Operators

    Using operators in a Bash script is how you determine whether a condition is true or not. And testing for conditions is how we program a Bash script to be dynamic by giving it the ability to respond differently depending on a scenario.

    Creating conditionals is why it is essential to know the various Bash operators. Operators let us test things like arithmetic functions, compare strings, check if a file exists, and a lot more.

    In this tutorial, you will learn about all of the operators that can be used in a Bash script on a Linux system. We will go over examples so you can learn how to use each type of operator in real context.

  • Bash Scripting: Command line arguments

    In some Bash scripts, there is an option to pass arguments to the script when you are executing it. This allows the user to specify more information in the same command used to run the script.

    This is yet another way for us to accept input in a Bash script, and make our script more interactive with the user executing it. Command line arguments are specified as extra bits of information (or flags/options) that are passed to the script.

    In this tutorial, you will learn how to accept command line arguments in a Bash script on a Linux system. Follow along with our example below to see how it works.

  • Bash Scripting Cheat Sheet

    The ability to automate tasks with Bash scripts in Linux is one of the operating system’s most powerful components.

    However, due to the sheer amount of scripting components, it can be intimidating for newcomers. Even longtime users may forget something every once in a while and that is why we have created this Bash scripting cheat sheet.

    For times like these, it’s very handy to have a compiled list of Bash scripting components that have been sorted by category. That way, it only takes a few moments to reference the list whenever you forget the exact syntax of an operator or conditional statement, etc.

    In this tutorial, we’ll present you with a curated list of the most handy things to know for Bash scripting. These are some of the most useful components, but they aren’t easy to remember for everyone. Next time your mind is blanking when writing a Bash script, take a look at the Bash scripting cheat sheet below for some quick help.

  • Bash scripting vs Python

    Bash scripting and Python are two different ways to program and automate tasks on a Linux system. Many Linux users choose to learn one or the other, and some even learn both.

    Although they have a lot of overlap in the purposes they serve, Bash scripts are mostly just shell commands that have been chained together, sometimes along with loops or conditional statements, and Python is a full fledged programming language, capable of creating everything from basic automation scripts to programs with graphical user interfaces.

    In this tutorial, you will learn about some of the differences between Bash scripting and the Python programming language, specifically in the context of what both are capable of and used for on a Linux system.

  • Bash scripting vs PowerShell

    Bash is the command interpreter for Linux systems and is well known as a tool that can be used for automation and repetitive tasks via Bash scripts. PowerShell serves the same purpose, but for Windows systems.

    With so much overlap in their functionalities, and with both being installable on a variety of operating systems, the inevitable questions of “which one is better” and “what are the differences” around bound to come up.

    In this tutorial, you will learn about some of the differences between Bash scripting and the PowerShell scripting, as we compare the two across a few key areas.

  • Xephyr and browser menu entry fixes

    Now fixed. The problem was caused by the xserver-xorg moving from autotools to meson. I also had to apply a patch to xephyr source, as reported in the above-linked post.

  • Project Aims to Port .NET Framework to Power [Ed: They are not our allies.]

    IBM and its Red Hat subsidiary are working with Microsoft to port the .NET Framework to Power, IT Jungle has learned. The project has been underway for a while, and the first bits of beta code should be available for developers to play with later this year.

  • The Qt Less Traveled [Ed: The worse issue is, that's proprietary so you cannot fix bugs in Qt]

    Qt is a high quality library, but it is also massive in number of features. This massive number results in a higher likelihood that there are bugs that go unnoticed lying around in its less frequently used features or combination of features.

    Our friends at qgis.org hired us to solve some of those issues that had been affecting them for a while. QGIS is an open source geospatial information system (an application which allows users to design maps, analyze spatial data, and perform various ETL tasks) that makes use of the Qt library for its GUI components and relies on the QPainter framework for all of its map rendering and exporting functionality. Instead of trying to workaround these issues in their downstream project, the QGIS leadership instead invested some project funds to contract KDAB to fix these rare issues which were specifically affecting the QGIS application. Keep reading to follow our adventures through those less often traveled paths.

  • When to “address” “technical debt”?

    It’s not old code that’s technical debt, it’s lightly-designed code. That thing that seemed like the solution when you first thought of it. Yes, ship it, by all means, but be ready to very quickly rewrite it when you learn more.

    Some of what people mean when they say “we need to bring our technical debt under control” is that kind of technical debt, struggling under the compound interest of if statement accrual as multiple developers have added behaviour without adding design. But there are other things. Cutting corners is not technical debt, it’s technical gambling. Updating external dependencies is not technical debt repayment, but it does still need to be done. Removing deprecated symbols is paying for somebody else’s technical debt, not yours: again you still have to do it. Replacing last month’s favoured npm modules with this month’s is not technical debt, it’s buying yourself a new toy.

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.