Home » Articles by: Brad Morton

Using the ‘pwd’ Command in Linux, with Examples

Using the ‘pwd’ Command in Linux

Whether you’re developing Python apps on Linux, or just organizing your files from the shell, it’s important to be able to find out which folder you are currently navigating. The pwd command will do that for you – it prints the name of the current directory you are navigating in the terminal – including its full path. This is extremely useful in any Linux environment as it will remove all confusion about which folder you’re in, as it’s very common for there to be multiple folders of … Read more

Home » Articles by: Brad Morton

Removing an Element From an Array in JavaScript, with Examples

Removing an Element From an Array in JavaScript

There are multiple ways to remove an element from an array in Javascript. We cover all of the methods that can be used in this tutorial. JavaScript is a flexible programming language that runs just about everywhere. You can run JavaScript apps in web browsers, build command-line apps you can run in the terminal, mobile apps can be built using platforms like Cordova, and server processes can be written on platforms like Node.js. Naturally, Linux is the environment of choice for many JavaScript developers and … Read more

Home » Articles by: Brad Morton

The Linux ‘cp’ Command: Copy files and Directories

'cp' Command

This tutorial will teach you to use the Linux cp command – the command that copies files from one directory to another. Linux is the preferred platform for a lot of developers. If you’re new to Linux it won’t be long before you need to start copying files from one place to another – read on for an explanation of the Linux cp command and some tips and tricks on how to use it. The cp Command The cp command has a simple purpose – to copy files and folders … Read more

Home » Articles by: Brad Morton

Best Raspberry Pi and Pi Zero Projects – Upgrade Your Home With Our Favourite Picks

Best Raspberry Pi and Pi Zero Projects

Looking for some home projects to keep you occupied over the winter months? LinuxScrew has you covered with this collection of Raspberry Pi projects for your home! Best Raspberry Pi Projects Raspberry Pis are cheap single-board computers that can be used for a variety of tasks – from desktop computers to web servers, and automation. Read on for some great projects for your home that utilize the Raspberry Pi and Pi Zero. Raspberry Pi CCTV System Turn a raspberry pi and a USB webcam into … Read more

Home » Articles by: Brad Morton

How to use ‘try/catch’ in PHP (with Examples)

'try/catch' in PHP

PHP is one of the most popular programming languages used to develop web applications and APIs. Linux is the system of choice for serving up your PHP code and is also an ideal PHP development environment. When writing PHP code, you’ll sometimes want to perform a certain action when an error is encountered (rather than just sending the user an error message and halting code execution). This is exactly what try/catch is used for in PHP. Syntax try { // Code to attempt } catch (Exception $e) { … Read more

Categories PHP

Home » Articles by: Brad Morton

How to Use “if… else” in JavaScript (with Examples)

"if... else" in JavaScript

JavaScript has quickly become one of the most popular programming languages due to its ease of use and flexibility – it can be run in just about any web browser on any device making it perfect for cross-platform apps. Linux is the most popular platform for hosting JavaScript Apps built with Node.js and is a great platform for developing both standalone JavaScript programs and browser-based solutions. If you’re learning JavaScript the if… else control structure is one of the first things you’ll want to get the hang … Read more

Home » Articles by: Brad Morton

How to Use “if… else” in Bash Scripts (with Examples)

if else bash

Bash scripting is a vital tool for developers to automate tasks in Linux. Bash scripts can be used to automate development tasks locally (like uploading files for deployment, compiling apps, or resizing images in bulk), as well as for server-side tasks (sending scheduled emails, collecting data at intervals, or sending notifications to devices). You’ll want to run some tasks dependent on the outcome of another task or variable, and that’s where if … else will help you. This decision making process in Bash scripts is called using conditionals. … Read more

Home » Articles by: Brad Morton

Arduino vs Raspberry Pi: What are they and which one should I use?

arduino vs raspberry pi 1

This article explores the differences and common uses for the Raspberry Pi and Arduino hardware platforms. You’ll see a lot of talk about “Arduino vs. Raspberry Pi” as if they’re competing products – but they’re not! Arduinos and Raspberry Pis may both have started as small, affordable teaching platforms, but their intended uses are different, and they have diverged into two families of products with very different features that can do very different things. Check out the guide below to help you decide which one to choose for your next project. … Read more

Home » Articles by: Brad Morton

How To Remove Items From A List in Python (With Examples)

python remove items from list

Python is widely used for both scripting and automation on Linux, as well as building web and standalone applications. Python is designed to be easy to learn, easy to write, and easy to read. It’s a great multi-purpose programming language. Python has several different types of arrays for storing data. Lists are arrays which allow you to store items. Items in lists can be altered, and are stored in a specific order. Syntax and Examples There are several methods you can use to remove an … Read more