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

How to Configure vsftpd an Anonymous FTP Server

Anonymous vsftpd server

This article will show you how to configure vsftpd as an anonymous FTP server which does not require authentication. vsftpd is an FTP file server which can run on Linux. FTP is is the file transfer protocol. It’s been around forever (since the 1970’s!), so it works with just about everything. I run vsftp on an openwrt router as a quick and dirty file sharing solution that will work with even the oldest of my devices (including Windows 3.1 and old Macintosh computers). The software for these old machines … Read more

Formatting Numbers with the JavaScript toFixed()* Method [Examples]

JavaScript toFixed()

This tutorial will show you how to format numbers to a fixed number of decimal places in the JavaScript programming language. JavaScript Number Variables JavaScript variables have different types. The type of a variable defines what kinds of values it can hold, and what can be done with that value. Number typed variables hold numeric values and include a number of methods (built in functions) for performing numeric operations. Number variables are declared by simply assigning a numeric value to a variable, or using the Number … Read more

Checking an Array Contains a Value in JavaScript [Examples]

JavaScript in array includes

This article will show you how to check if a value is in an array in the JavaScript programming language. Code examples to check whether an array includes a value are provided. Arrays in JavaScript Arrays are a type of variable that hold an ordered list of values. Each value in an array has a position within the array, called the index. The index can be used to access each value in the array. Indexes are integer values, which start counting from 0 (zero) for the first … Read more

Beginners Guide to Floating Point Arithmetic Precision

The Ultimate Beginners Guide to Floating Point Math/Arithmetic Precision Problems

This guide will explain the programming issues you will encounter when performing arithmetic with floating point numbers, and how to avoid them. The reason why these issues occur will be summarised and solutions will be provided. Floating point precision issues are common hurdle for beginner programmers – sometimes the result of what should be a simple mathematical operation comes out wrong, and little reason is given. Floating point precision issues are usually the cause, so here’s what they are and why this problem occurs. What … Read more

Using The Python decimal Class for Accurate Calculations

Python decimal class

This guide will introduce you to the Python decimal library and class – Python tools which allow you to accurately work with decimal numbers without the rounding and accuracy issues which frequently arise when working with floating point numbers. Computers Can’t Perform Accurate Arithmetic With Decimal Numbers Decimal numbers are commonly stored as floating point number values. Computers are not particularly good at performing arithmetic with this type of numbers accurately. We break down why this is in our Ultimate Beginners Guide to Floating Point Math/Arithmetic Precision Problems. … Read more

The JavaScript toString() Method, Explained + Examples

JavaScript toString()

One of the most common things you will want to do with a variable is to print a string representation of it. That’s what the toString() method is for. This article will explain when and how you can use it. Converting to Strings Data is displayed on your computer screen is most frequently displayed as text strings, regardless of how the data was stored. Numbers, arrays, boolean values, and objects, all have string representations that allow them to be viewed as text on screen, either for the … Read more

Configuring a Privacy VPN with OpenVPN on OpenWrt With LuCI

OpenVPN on OpenWrt With LuCI

This tutorial will show you how to configure a privacy Vpn using OpenVPN on OpenWrt through the LuCI web interface (no command line required!). Lots of screenshots are included so that you can follow along. What is OpenWrt OpenWrt is a popular Linux distribution for routers and other low power devices. It makes a perfect host for a VPN gateway. What is a Privacy VPN/ What is OpenVPN? A VPN (Virtual Private Network) provides an encrypted connection between two networks over the internet. Traditionally this was used for … Read more

Building a Raspberry Pi 4 WiFi Access Point + Airplay Server

Raspberry Pi Access Point and Airplay

This tutorial will detail how to build a wireless access point using a Raspberry Pi 4 with hostapd. I’ll also set up an Airplay server using shairport-sync so that my access point can play music. There are a number of tutorials for setting up a Raspberry Pi as an access point, but many are outdated or don’t work – this one does! The Setup I want to set up my Pi as an access point – supplying internet via ethernet cable and broadcasting a wireless network. I’ll be … Read more

Browsing the Internet on a 1989 Macintosh II with a Web Rendering Proxy

Browsing the Internet on a 1989 Macintosh II with a Raspberry Pi

For completely impractical reasons I decided to try and browse the internet using my 1989 Macintosh IICI computer. Here’s how it went. I’ve previously tried web browsing with Web Rendering Proxy on a 1993 Windows 3.11 computer, and thought I’d see how the Apple experience stacks up. Setting up the Raspberry Pi with Web Rendering Proxy Web Rendering Proxy is a neat little tool that lets you browse the internet from older devices. It works by rendering a modern web-page in a modern Chromium browser, … Read more

DIY Raspberry Pi Powered Pinball Machine [Kitchen Build]

Raspberry Pi Powered Pinball

This article will show you how I built a DIY Raspberry Pi Powered Pinball game using GDevelop and an Arduino to add physical push-buttons to control the game. GDevelop is a zero-code game development studio, so this article has almost no coding required. I’ve been meaning to check out GDevelop for a while, so I’ve combined a simple GDevelop game with a 2-button Arduino game controller to make a little virtual pinball machine.  Here’s the finished product in action! What We’re Building As you can … Read more