Home » Articles by: Brad Morton

Installing Pi-Hole Ad Blocker on a Raspberry Pi Zero

Installing Pi-Hole Ad Blocker on Raspberry Pi Zero

Ads are annoying and they slow down your internet browsing experience.  Here’s how to block them for your whole network using Pi-Hole and a Raspberry Pi Zero. No-one likes ads. Ads interrupt videos.  Ads crowd up web pages while you’re trying to read. Ads pop up at the worst moment. There are probably ads competing for your attention while you try to read this right now. Pi-Hole to the Rescue Pi-Hole is an ad blocking solution that blocks ads for your whole network – including … Read more

Home » Articles by: Brad Morton

Array.shift() to Remove First Item from JavaScript Array [Examples]

JavaScript Array Shift

This short tutorial will show you how to use the JavaScript Array.shift() method to remove items from an array, and provide some code examples. JavaScript Arrays An array is a variable type which can hold zero or more values within it. Each value in an array has a position, called the index – which is an integer value representing the items position in it’s order of appearance. Indexes start counting at position 0 – so the first item in an array is at index 0, the second item at index 1, and so on. JavaScript … Read more

Home » Articles by: Brad Morton

PHP vs Ruby – Which One should I Pick for my Project in 2022?

PHP vs Ruby

This article will explain what the PHP and Ruby programming languages are, what they’re best used for, and which one you should pick up in 2022. What is PHP? PHP: Hypertext Preprocessor. PHP a recursive initialism that contains its own name, just to make things confusing for you: P PHP H Hypertext P Preprocessor PHP is a processing language – it can search, calculate, and do things based on logical conditions. PHP usually outputs the information it has processed via HTTP – as a web page, … Read more

Categories PHP

Home » Articles by: Brad Morton

The Python ‘os’ Library – What it is and How it’s Used

Python os Library

This article will give a short overview of the Python os (Operating System) module – and show some examples of how it is used. What is the Python ‘os’ Library/Module? The Python os library contains helpful tools and functions for interacting with the underlying Operating System being used to execute the running Python code. It can be used to query information about the system environment – including operating system, disk space, memory information, and which path Python is being executed from. The information available will differ depending on which operating system Python is … Read more

Home » Articles by: Brad Morton

PHP vs Python: Which Should You Learn In 2022? What’s the Difference?

PHP vs Python

This article will explain what the PHP and Python programming languages are, where they’re best used, and which one is most useful in 2022. What is PHP? PHP: Hypertext Preprocessor. PHP a recursive initialism that contains its own name, just to make things confusing for you: P PHP H Hypertext P Preprocessor PHP is a processing language – it can search, calculate, and do things based on logical conditions. PHP usually outputs the information it has processed via HTTP – as a web page, or as formatted data to be … Read more

Home » Articles by: Brad Morton

What is the best Operating System/OS to Use for Python Development?

Which Operating System is Best for Python

This website is called LinuxScrew.com so I’ll get the obvious out of the way: the best OS for Python development is Linux. Here’s why. Why Linux is the Best OS to Develop Python Apps? …because Linux is the preferred OS of many, many other developers. That may seem like a silly statement – however – consider that the developer writing the tutorial you are going to use to learn to write Python code will be using Linux, you want to be able to enter the same commands and use … Read more

Home » Articles by: Brad Morton

Deleting Files in PHP with unlink() [Examples]

PHP Delete File with unlink()

This article will show you how to delete a single file or multiple files in PHP using the unlink() function, and provide code examples. Once you have file uploads working in PHP, you may want to allow your users to delete files they no longer wish to keep. Read on to find out how. There is no PHP Function called ‘Delete’ To clear up any confusion, unlink() is the function for deleting files in PHP. There is no built in PHP function called delete(). If you’re looking to delete a directory in PHP, … Read more

Categories PHP

Home » Articles by: Brad Morton

How to Add Extra External USB Storage to an OpenWrt Device

OpenWRT add USB external storage

This tutorial will document steps you need to take to add USB storage to your OpenWrt router. These steps are tested on OpenWrt 21.02 in 2022. These steps were tested on a BT HomeHub 5 which was modified to run OpenWrt. These devices come with 128MB of storage – enough for OpenWrt and software, but not really enough for hosting file shares. Picking a USB Storage Device Most routers running OpenWrt will not be able to supply enough power to spin a mechanical hard disk. Avoid portable hard … Read more

Home » Articles by: Brad Morton

NVM Node Version Manager – Why it’s Great, How to Use it in Linux

NVM Node Version Manager Linux

The Node Version Manager (NVM) is an indispensible tool for JavaScript Developers. Here’s why it’s so useful, and how to use it in Linux. What is Node.js Node.js is a JavaScript runtime which allows you to build and run JavaScript apps outside of the web browser. It’s commonly used to build APIs, webapps and even desktop applications. New versions of Node.js are released periodically, with major version releases often breaking compatibility with code written for earlier versions. Managing Code Dependencies Sucks A code dependency is any software … Read more

Home » Articles by: Brad Morton

How to Reverse a String in JavaScript in One Line of Code [Example]

Javascript Reverse String

This quick tutorial will show you how to reverse a string in JavaScript. Strings are Array-Like Strings in JavaScript are considered array-like. A string is an ordered series of characters, so it can be considered as an array of characters. This makes it easy to convert a string to an array. We can then use any one of the methods available for reversing the array to reverse the string. This means you can use any of the methods we’ve previously outlined on reversing arrays on strings. … Read more