Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • An Introduction to Bash Brace Expansion

    The Borne Again Shell (BASH) has a lot of great features that it borrows from other shells and even from some programming languages. It was created in the late 1980s in a response to a lacking in the current available shells on Berkley Distributions (BSD), and the predecessor to Linux, GNU. BASH features numerous in-built features such as in-line scripting capabilities like brace expansion, which we are going to examine today.

  • Rakudo Weekly News: 2021.04 Grant Reporting
  • The Trouble with Reference Counting

    Perl uses a simple form of garbage collection (GC) called reference counting. Every variable created by a Perl program has a refcnt associated with it. If the program creates a reference to the variable, Perl increments its refcnt. Whenever Perl exits a block it reclaims any variables that belong to the block scope. If any are references, their referenced values’ refcnt are either decremented or they’re reclaimed as well if no other references to them remain.

  • Dustin J. Mitchell: The Horrors of Partial-Identity Encodings -- or -- URL Encoding Is Hard

    URL encoding is a pretty simple thing, and has been around forever. Yet, it is associated with a significant fraction of bugs in web frameworks, libraries, and applications. Why is that? Is there a larger lesson here?

  • Enrico Zini: nspawn-runner: support for image selection

    .gitlab-ci.yml supports 'image' to allow selecting in which environment the script gets run. The documentation says "Used to specify a Docker image to use for the job", but it's clearly a bug in the documentation, because we can do it with nspawn-runner, too.

    It turns out that most of the environment variables available to CI runs are also available to custom runner scripts. In this case, the value passed as image can be found as $CUSTOM_ENV_CI_JOB_IMAGE in the custom runner scripts environment.

  • Introduction to Making GraphQL APIs and Apps in Node.js – Linux Hint

    The communication and data transfer between the front end and backend of any application occurs through APIs (Application Programming Interface). There are many different types of APIs used to communicate between the front and back-end applications like RESTful API, SOAP API, GraphQL API, etc. The GraphQL API is a relatively new technology, and it is much faster than other types of APIs available. Fetching data from the database using GraphQL api is much faster than the REST API. While using GraphQL API, the client has control to fetch only the required data instead of getting all the details; that is why GraphQL API works faster than REST API.

  • Issue with phpMyAdmin and PHP: Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable”

    Today, I had installed PHP 7.3 and phpMyAdmin on Ubuntu 18.04 LTS system. I am using MariaDB as database server running on the same instance. When I tried to access data in tables using phpMyAdmin got the following error message on screen.

  • C++ Access Specifiers – Linux Hint

    In C++, a class is a set of variables and functions that have been configured to work together. When the variables of the class are given values, an object is obtained. An object has the same variables and functions as a class, but this time, the variables have values. Many objects can be created from one class. One object differs from another object according to the different set of values assigned to the variables of the other object. Creating an object from a class is said to be instantiating the object. Even if two different objects have the same values for their variables, these objects are different entities, identified by different names in the program. The variables for an object and its corresponding class are called data members. The functions of an object and its corresponding class are called member functions. Data members and member functions are called members.

    The word access means to read or change the value of a variable, and it also means to use a function. C++ access specifiers are the words, “private,” “protected,” and “public.” They decide whether a member can access other members of its class, or if a function or operator outside the class and not belonging to the class can access any member of the class. They also decide whether a member of a derived (child) class can access a member of a parent class.

    Basic knowledge of C++ is required to understand this article and to test the code provided.

  • Compiling Code in Parallel using Make – Linux Hint

    Whoever you ask how to build software properly will come up with Make as one of the answers. On GNU/Linux systems, GNU Make [1] is the Open-Source version of the original Make that was released more than 40 years ago — in 1976. Make works with a Makefile — a structured plain text file with that name that can be best described as the construction manual for the software building process. The Makefile contains a number of labels (called targets) and the specific instructions needed to be executed to build each target.

    Simply speaking, Make is a build tool. It follows the recipe of tasks from the Makefile. It allows you to repeat the steps in an automated fashion rather than typing them in a terminal (and probably making mistakes while typing).

    Listing 1 shows an example Makefile with the two targets “e1” and “e2” as well as the two special targets “all” and “clean.” Running “make e1” executes the instructions for target “e1” and creates the empty file one. Running “make e2” does the same for target “e2” and creates the empty file two. The call of “make all” executes the instructions for target e1 first and e2 next. To remove the previously created files one and two, simply execute the call “make clean.”

  • Zeal – simple offline documentation browser

    Zeal is billed as a simple offline documentation browser. It offers easy access to a huge database of documentation, API manuals, and code snippets.

    The main purpose of the software is to enable you to have reference documentation at your fingertips. Let’s see how it fares.

More in Tux Machines

CoreELEC 19.0 “Matrix” Linux Distro Released for Amlogic Hardware Based on Kodi 19

As its codename suggests, CoreELEC 19.0 “Matrix” is the first release of this LibreELEC fork to be based on the recently released Kodi 19.0 “Matrix” open-source home theater software, which introduces numerous new featiures and improvements for those who want to make their own media center PC or HTPC. Based on the CoreELEC 9.2.6 Amlogic-NG release, the CoreELEC 19.0 series becomes the active development branch, supporting only Amlogic-NG devices like LaFrite, LePotato, ODROID-C4, ODROID-HC4, and ODROID-N2. Read more

Mozilla Leftovers

  • A Better Terminal for Mozilla Build [Ed: Mozilla is moving in a bad direction that serves Windows, not standards or the open Web or software freedom]

    If you’re working with mozilla-central on Windows and followed the official documentation, there’s a good chance the MozillaBuild shell is running in the default cmd.exe console. If you’ve spent any amount of time in this console you’ve also likely noticed it leaves a bit to be desired. Standard terminal features such as tabs, splits and themes are missing. More importantly, it doesn’t render unicode characters (at least out of the box).

  • Mozilla Open Policy & Advocacy Blog: India’s new intermediary liability and digital media regulations will harm the open internet

    Last week, in a sudden move that will have disastrous consequences for the open internet, the Indian government notified a new regime for intermediary liability and digital media regulation. Intermediary liability (or “safe harbor”) protections have been fundamental to growth and innovation on the internet as an open and secure medium of communication and commerce. By expanding the “due diligence” obligations that intermediaries will have to follow to avail safe harbor, these rules will harm end to end encryption, substantially increase surveillance, promote automated filtering and prompt a fragmentation of the internet that would harm users while failing to empower Indians. While many of the most onerous provisions only apply to “significant social media intermediaries” (a new classification scheme), the ripple effects of these provisions will have a devastating impact on freedom of expression, privacy and security.

  • Karl Dubost: Capping User Agent String - followup meeting [Ed: Hopefully enough people understand the degree to which use agents in a Web browser are leveraged for fingerprinting/tracking/surveillance/abuse]

    A couple of weeks ago, I mentionned the steps which have been taken about capping the User Agent String on macOS 11 for Web compatibility issues. Since then, Mozilla and Google organized a meeting to discuss the status and the issues related to this effort. We invited Apple but probably too late to find someone who could participate to the meeting (my bad). The minutes of the meeting are publicly accessible.

Security Leftovers

  • Is Your Browser Extension a Botnet Backdoor?

    A company that rents out access to more than 10 million Web browsers so that clients can hide their true Internet addresses has built its network by paying browser extension makers to quietly include its code in their creations. This story examines the lopsided economics of extension development, and why installing an extension can be such a risky proposition.

  • Security updates for Tuesday [LWN.net]

    Security updates have been issued by Arch Linux (bind, intel-ucode, ipmitool, isync, openssl, python, python-cryptography, python-httplib2, salt, tar, and thrift), Fedora (ansible, salt, webkit2gtk3, and wpa_supplicant), Oracle (bind), Red Hat (bind, kernel, and kpatch-patch), Scientific Linux (bind), SUSE (firefox, gnome-autoar, java-1_8_0-ibm, java-1_8_0-openjdk, nodejs10, open-iscsi, perl-XML-Twig, python-cryptography, and thunderbird), and Ubuntu (bind9).

  • Malicious NPM packages target Amazon, Slack with new dependency attacks [Ed: Microsoft delivering malware again, but the media (actually a Microsoft propaganda site in this case) does not mention Microsoft (similar to this)]

    Last month, BleepingComputer reported that security researcher Alex Birsan earned bug bounties from 35 companies by utilizing a new flaw in open-source development tools.

  • Working Spectre exploits for Windows and Linux devices uncovered

    A security researcher has discovered several working Spectre exploits that were uploaded to the VirusTotal database last month. Spectre, along with Meltdown, are two extremely severe hardware vulnerabilities that affect Intel, IBM POWER, and some ARM-based processors. While Intel has since implemented hardware mitigations for the vulnerability in newer processors, older ones have to rely on software fixes that come with a performance penalty, which prevents its blanket use. This means that there’s still a large number of systems that are vulnerable to the recently discovered exploits by security researcher Julien Voisin.

IBM/Red Hat Leftovers

  • The State of Enterprise Open Source 2021: Four results that may surprise you

    We’re now in the third year of our The State of Enterprise Open Source report in which we probe the use of and attitudes about enterprise open source. This year we conducted interviews with 1,250 IT leaders worldwide. They weren’t necessarily Red Hat customers and were unaware that Red Hat was the sponsor of this survey, helping us to avoid biased or influenced responses. Most of the questions were repeats from prior years, allowing us to explore trends over time, but we also threw in a few new ones too and got one answer that even we weren’t fully expecting.

  • IBM Begins Adding GCC Support For Z Arch14 - Likely IBM z16 - Phoronix

    GCC compiler patches began appearing this morning for IBM Z "Arch14" as a future architecture extension for their Z mainframe processors. IBM Z Arch14 will likely correlate to IBM z16. IBM z15 was introduced at the end of 2019 as "Arch13" while today is the first time we are hearing of IBM Z "Arch14" and the first time seeing any code in the GCC open-source compiler referencing it. Short of some re-branding or change in their numbering scheme at IBM, Arch14 will likely end up being IBM z16.

  • Red Hat's 2021 Open Source Survey: Who's Using the Software and Why | IT Pro

    Red Hat's 2021 State of Enterprise Open Source survey report finds that users trust its security, plan increased use of containers and more.

  • Robin CNS Now Runs On IBM Cloud Satellite

    IBM Cloud Satellite, now generally available, enables clients to run IBM Cloud services in multiple environments—on IBM Cloud, on premises, or at the edge—all delivered as a service. This flexibility will help bring cloud capabilities to where client data resides, in the environment of their choice, while focusing on consistency, user experience, and security.

  • IBM Cloud Satellite Goes GA

    IBM‘s hybrid cloud services are now generally available in any environment — on any cloud, on premises or at the edge — via IBM Cloud Satellite. Lumen Technologies and IBM have integrated IBM Cloud Satellite with the Lumen edge platform to enable clients to harness hybrid cloud services in near real-time and build solutions at the edge.

  • Packaging APIs for consumers with Red Hat 3scale API Management

    One of an API management platform’s core functionalities is defining and enforcing policies, business domain rate limits, and pricing rules for securing API endpoints. As an API provider, you sometimes need to make the same backend API available for different consumer segments using these terms. In this article, you will learn about using Red Hat 3scale API Management to package APIs for different consumers, including internal and external developers and strategic partners. See the end of the article for a video tutorial that guides you through using 3scale API Management to create and configure the packages that you will learn about in this article. [...] The Rate limits policy, shown in Figure 2, enforces call limits on APIs. Limits are defined for each method, and the same package can enforce different limits for each API method. Pricing rules are used to enable metering and chargeback for API calls. Pricing rules are defined for each API method, and the same package can enforce different pricing rules for each API method. Finally, the Features policy lets us define multiple features for each package. 3scale API Management adds metadata tags to each package to uniquely identify and map its available features. 3scale API Management’s packaging scenario is common, and most API management platforms support something similar. In the following sections, we will look at the different types of plans available from 3scale API Management.

  • Fedora Community Blog: Fedora Code of Conduct Report 2020

    In 2020 we had more than two times the number of CoC reports when compared to 2019. Due to dedicating a lot of time and effort to these situations, we spent a significant amount of time trying to understand why this was happening at these rates. We came up with a couple of theories. [...] As we look forward to 2021, we hope to introduce an updated Code of Conduct, as well as supporting documentation. Reminder to be kind and considerate to each other as we move into year two of pandemic life, there will surely be new challenges to overcome. We all depend on each other to create a community that is healthy, safe, and happy. Most of all, we love seeing folks self-moderate and stand up for the right thing day to day in our community. Keep it up, and keep being awesome Fedora, we <3 you!

  • Pure Storage teams up with IBM to bring OpenShift hybrid workloads to IBM Cloud Satellite

    Global Kubernetes Data Services Platform, Portworx by Pure Storage, has announced a partnership with IBM to enable OpenShift-based data services to run in hybrid cloud environments with performance, data protection, data security, and mobility on IBM Cloud Satellite. IBM Cloud Satellite allows clients to run IBM Cloud services no matter whether it is on a cloud, on-premises, in multi-cloud, or at the edge, which IBM’s research is a growing area with increased proliferation of edge devices. This flexibility brings cloud capabilities to where client data resides, allowing organisations to focus on solving business problems. The product builds on IBM’s deep industry expertise across industries such as telecommunications, healthcare, banking, insurance, travel and transportation. The Portworx by Pure Storage partnership fuels hybrid cloud environments by helping Government and enterprises manage and modernise workloads from bare-metal to multi-cloud or anything else in between, with Red Hat OpenShift.