Welcome to LinuxScrew

A site for Linux lovers worldwide. For newbies, system engineers, administrators, and everybody in between. We cover all things Linux, plus various programming languages, including Python, Javascript, and PHP.

View our featured tutorials and projects in the slider below or scroll down to see all recent articles.

How to Convert a USB Printer to Wireless with a Raspberry Pi
How to Use a Raspberry Pi for Digital Signage
The Worst Things You’ll Probably Google As a Programmer on Linux
How to Build a Raspberry Pi Internet Kiosk
Browsing the Internet on a 1989 Macintosh II with a Web Rendering Proxy
previous arrow
next arrow
Slider

Python getattr() – What it Does and How to Use It [Examples]

Python use getattr() to get object attributes

The getattr() function is used to get the value of an attribute of an object. Here is how it is used, with examples. Python Objects and Classes Python is an object oriented programming language. Object oriented means that rather than code being written as a list of instructions, accumulating data and passing the results to the following lines of code (known as procedural programming), data and functionality is contained within the objects it describes. Each object is a self-contained representation of something, that can be modified, and passed between functions … Read more

Python – Concatenating Iterators With itertools.chain() [Examples]

Concatenate:join iterables using chain in Python

This tutorial will show you how to join/concatenate/merge iterables in the Python programming language, and provide code examples. What is an ‘Iterable’ in Python? An iterable is any kind of Python object that can return each of its members one at a time. Put simply, it’s any Python object that contains multiple values that can be looped over. Python’s built-in Iterables include lists, strings, and tuples — all object types which can be represented as a sequence of values. Iterating over Iterables To demonstrate this behaviour, we can create a list of strings, … Read more

LinuxScrew Guide for Developers Learning PostgreSQL

Learn PostgreSQL Guide

This page serves as the index for our PostgreSQL tutorials. It will be updated as new articles in the series are added. This guide is intended for developers who are just getting started with PostgreSQL and are looking for a simple resource to get them up and running. PostreSQL Guide Introduction: What is PostgreSQL? Why Use It ?

How to Use while Loops in Bash/Shell Scripts [Examples]

Bash while Loops

This article will show you how to use while loops in Bash/Shell scripts, and provides some code examples. Bash scripts let you automate tasks in the linux shell. Often, you’ll want to repeat a task for a set of data or repeated user input – that’s what while loops are for – they let you loop or iterate over a sequence of data or input, making it easy to build scripts that repeat a set of actions. The while loop syntax demonstrated below will also work for the Zsh shell and … Read more

KDE Neon Linux Mini Review 2022 + Screenshots

KDE Plasma 5 Neon review screenshots

This review will show you what KDE Plasma 5 and KDE Neon look like in 2022, from installation to the desktop, and provide some thoughts on usability and how it stacks up against other GUIs like Gnome and MATE. What is KDE? KDE is a Desktop Environment mainly used on Linux systems.  It has since grown into a large development communitity working on a variety of desktop software projects including UI frameworks for use with the KDE desktop environment, and a suite of applications including … Read more

GB Studio Linux Mini Review + Screenshots

GB Studio Linux screenshots mini review

GB Studio is an easy to use game development tool that lets you make make games in a simple drag-and-drop interface.  Here’s a short review including screenshots of GB Studio running in Linux. In this article, I’ve taken some screenshots and made some notes as I installed and got up and running with GB Studio – it serves as a quick guide/review so you know what to expect if you decide to check it out. What is GB Studio? GB Studio is probably one of … Read more

How to Use the Bash case Statement, With Examples

How to Use Bash case Statements

The case statement is used to choose which code to execute based on the value of a variable or expression. Here is how to use it in your Bash scripts. What Does the case Statement Do? The case statement is a convenient alternative to using multiple if/if else statements when you are deciding what action to take based on the value of a variable or expression. For example, if you have a variable called weekday, you can executed different code based on which day of the week is named in the variable, … Read more

PostreSQL Guide Introduction: What is PostgreSQL? Why Use It ?

PostgreSQL Introduction - What is PostgreSQL

This article is part of the LinuxScrew Guide for Developers Learning PostgreSQL. PostgreSQL is a relational database management system. It is similar to other networked SQL database servers like MySQL/MariaDB and Microsoft SQL, but there are some key differences in features and functionality. PostgreSQL vs Other Database Systems You can see a comparison of PostgreSQL and other database systems here. In short, while MySQL is the most popular open source database system, PostgreSQL is more advanced. PostgreSQL is object oriented, can store a larger number of types … Read more

Filter JavaScript Array With Multiple Conditions/Values [Examples]

JavaScript filter array using multiple conditions/values

This article will show you how to filter an array using multiple conditions, to return multiple values. Example code is provided. We’ve already covered filtering arrays in general – this article covers specifically how multiple conditions can be used with the Array.filter() method. The Array.filter() Method The filter() method is available on all arrays in JavaScript. It creates a new array, containing only the items from the original array which passes all conditions in a provided function. filter() Method Syntax The syntax for the array filter() method is as follows: ARRAY.filter(ELEMENT => FUNCTION) Note that: ARRAY is … Read more

The JavaScript valueOf() Method – What Does it Actually Do?

JavaScript valueOf()

This quick tutorial will explain the JavaScript valueOf() Method, what it does, and why you might use it. The JavaScript valueOf() method gets the primitive value of the object it is called from. Usually you will not need to call it, however it does have its use cases. Primitives vs Objects In JavaScript, a value or variable has a type of value. A primitive is a value that is not an object, with no methods or properties, representing only the data that it exists as. JavaScript has 7 primitive data types: string number bigint boolean undefined … Read more