Home » Articles by: Brad Morton

PHP trim() Function [With Examples]

PHP trim Function

You’ll want to process and tidy your user input before you do anything with it when building PHP apps. trim() is one of the tools available to do this – it removes all white space from the beginning and end of a string. Whitespace is things like spaces, tabs, and newlines which may be invisible to the user. PHP trim Syntax trim ( $string [, $character_mask = ” \t\n\r\0\x0B” ] ) Note that: By default, $string will be returned by trim() with all whitespace removed from the beginning and end, including: … Read more

Categories PHP

Home » Articles by: Brad Morton

Raspberry Pi Alternatives [2021] – 8 Best Single Board Computers

Raspberry Pi Alternatives

The rise and rise of the Raspberry Pi’s popularity – as a home server, media box, emulation machine, or maker platform – has led to a host of imitators, and in some cases, successors. Finding the right single-board computer for your project will make development easier- so here’s a summary of some of the single-board computers getting about in 2021. 8 Best Alternatives to the Raspberry Pi We’ll only include boards with built-in memory and video out – all in one single board computers and … Read more

Home » Articles by: Brad Morton

Using JavaScript ‘toLowerCase()’ String Method [with Examples]

JavaScript toLowerCase

Want to make a string all lower case in JavaScript? It’s the toLowerCase() method to the rescue! The toLowerCase() method is part of the string object and has full support in all browsers. In JavaScript, strings can either be a primitive or an object – primitives are the most basic kinds of variables, which are not objects, have no methods, and simply represent the given characters. However, String objects have useful methods for manipulating and measuring the string – like toLowerCase(). By default, JavaScript’s string variables are initialized as primitives – but will be automatically … Read more

Home » Articles by: Brad Morton

How to Install Pip/Pip3 for Python [Simple Guide]

How to Install Pip3

This tutorial will teach you how to install pip3, the package manager for Python, on Ubuntu Linux. Pip is a Python Package Manager. It’s currently at version 3 – hence, Pip3. Python is useful on its own, but it’s even more useful when you can start leveraging other people’s pre-written code. The default repository used by Pip is the Python Package Index (PyPI) (https://pypi.org/). PyPI contains a collection of other users’ code for performing a multitude of tasks, from drawing graphs to artificial intelligence. Checking if Pip is Already Installed … Read more

Home » Articles by: Brad Morton

How to SSH Into Your Raspberry Pi Remotely [Simple Guide]

How to SSH Into Your Raspberry Pi

Here’s a summary of the options available for connecting to your Raspberry Pi via SSH – from Linux, macOS, and Windows. Networking We’ll assume you have your Pi on your network – wired or wirelessly. Static IP Address vs DHCP Your Raspberry Pi will most likely be configured to receive an IP address via DHCP (Dynamic Host Configuration Protocol), which means your router assigns an available address to your Pi. As it’s assigned automatically, you won’t know what it will be in advance. If you’ve … Read more

Home » Articles by: Brad Morton

GitLab vs. GitHub: A Simple Comparison

GitLab vs. GitHub

What is Git? Git is a Version Control system that allows you to track the changes you make to files stored in a repository. Git is most commonly used by programmers to store and track changes to their code, but is also used for tracking changes and progress on other text files or data sets – for example, it has become popular with Ph.D. students use it to store and manage the writing of their thesis’, and with authors writing complex books with many revisions. Terminology Here’s a quick … Read more

Home » Articles by: Brad Morton

Listing Databases and Tables in MySQL and MariaDB

mysql mariadb list databases tables

This guide explains how to list databases and tables using MySQL or MariaDB using simple commands. Managing your databases from the Linux shell is quick and efficient compared to some of the bloated database management tools available. Here’s a quick primer on seeing what databases and tables you’ve got set up on your MySQL or MariaDB server. Listing Databases Once you’ve logged in to your database, simply enter the following to list your databases: SHOW DATABASES; You’ll get a list of all of the databases … Read more

Home » Articles by: Brad Morton

DIY Raspberry Pi Laptop/Palmtop Computer [Kitchen Build]

DIY Raspberry Pi Palmtop

There was once a PC form factor known as the ‘Palmtop’ and it was good. Then, tablets appeared and pretty much wiped them out completely. I am still a huge fan of palmtops – they’re great for travel or getting some light work done in the park without having to lug about a full laptop, try and type on a tablet screen, or trying to angle those awful tablet keyboard cases on your lap so that they don’t collapse. There are a few modern attempts … Read more

Home » Articles by: Brad Morton

Making POST Requests with cURL

post requests curl

cURL is a package that contains various tools for transferring data between remote servers. It supports FTP, Windows Shares, Mail Servers, and of course Web Servers using HTTP. Downloading a file from the Linux shell is usually accomplished using the cURL command like so: curl http://example.org/file.zip –output file.zip This makes the request for the file using the GET method and simply downloads it. This article will detail how to use cURL to make a POST request, including form data. This may be useful if the server requires … Read more

Home » Articles by: Brad Morton

Boolean Operators: Comparing Values in Python

Boolean Operators in python

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. Boolean Values This article covers how boolean operators work in Python. In programming, a boolean value is either TRUE or FALSE. When comparing values in Python, a boolean value is returned allowing you to store the result of the comparison, or take a certain action … Read more