Export Thunderbird Accounts to Mobile When Stuck on an Older ESR Release

Mozilla recently launched Thunderbird Mobile for Android, and I was eager to give it a try. However, I am running Linux Mint 21.3, and installing Thunderbird from the repositories means you’re stuck with version 115.x, which doesn’t include the “Export to Mobile” feature. This is only available as of Thunderbird Desktop 128.4.0 or Thunderbird Beta 132 and newer.

Manually setting up my many email accounts on mobile wasn’t something I wanted to deal with. Instead, I downloaded a newer portable version of Thunderbird, used that to export my settings to the mobile app, and then reverted to my distro’s ESR release. This post explains how you can do the same.

More …

Sorting Selected Taxonomy Terms Alphabetically in ACF’s Select2 Field

When using Advanced Custom Fields (ACF) to manage taxonomy terms in a WordPress custom post type, the selected terms often appear in the order they were added rather than alphabetically.

This can be frustrating, especially when dealing with a long list of terms. Without a clear order, finding the right term at a glance can become a little tricky.

Luckily, we can hook into ACF’s filters to modify how the terms are loaded and ensure they are sorted alphabetically.

More …

Automating Weekly MySQL Backups via Email

Manually backing up databases can be a frustrating and time-consuming task. It often involves logging into servers, managing credentials, transferring files, and keeping track of schedules to avoid missed backups.

In this post, I’ll walk you through the steps I took to create an automated solution for weekly MySQL backups. It involves setting up a cron job to run the backup at regular intervals, then emailing it to myself for easy access.

More …

How to Create a CRUD App with Rails and React

Most web applications need to persist data in one form or other. When working with a server-side language, this is normally a straightforward task. However when you add a front-end JavaScript framework to the mix, things start to get a bit trickier.

In this tutorial I am going to demonstrate how to build a JSON API using Ruby on Rails and then code a fully-functional React frontend to interact with the API. The app we’ll be building is an event manager, which will let you create and manage a list of academic events.

The app will showcase basic CRUD functionality and will add a couple of extra features, such as a datepicker and search.

More …

How to Prevent the .xsession-errors File From Growing Too Large

Sometimes, without warning, your .xsession-errors file will grow to an enormous size. This can be inconvenient at best, or crash your operating system at worst.

In this post I explain how you can set up a cron job to automatically watch the file and get notified if it exceeds a certain size.

More …

How to Send Tweets With a JavaScript GitHub Action

GitHub actions is a feature which allows developers to construct workflows that run in response to various GitHub events. You can use them, for example, to run tests when a new pull request is received, post new issues to Slack, or publish a package to npm.

Previously, this kind of setup would have required a service such as Travis, or Circle CI. Actions however, are an official GitHub offering and give you first-class support for your automation needs.

In this article, I’m going to demonstrate how to create a GitHub action using JavaScript. This will post a tweet to Twitter every time a pull request is merged.

More …

setTimeout JavaScript Function: Guide with Examples

This article was first published on SitePoint and has been republished here with permission.

setTimeout is a native JavaScript function (although it can be used with a library such as jQuery, as we’ll see later on), which calls a function or executes a code snippet after a specified delay (in milliseconds). This might be useful if, for example, you wished to display a popup after a visitor has been browsing your page for a certain amount of time, or you want a short delay before removing a hover effect from an element (in case the user accidentally moused out).

More …