RSSAmplifier

Blog

James Hibbard

Web developer, network admin and author

hibbard.euRSS feed ↗10 posts

Latest posts

Erase Sensitive Files from Git History with git-filter-repo

Ever accidentally commit a password to Git? You’re not the only one. Last weekend, while working on a Rails project, I accidentally added my database.yml file to the repo and pushed it to GitHub. It contained my local MySQL password. No public exposure thankfully, but it still nagged at me. I didn’t want that file, or its contents, lingering in my Git history.

Deploying a Rails App with Apache & MySQL on Ubuntu Server

Getting a Rails application running on a remote server involves a fair bit of setup. Recently, I’ve had to go through the process a couple of times—provisioning a virtual machine, installing and configuring Apache, MySQL, Ruby, and Rails, and finally deploying the app. To make future deployments easier (and to have something to refer back to), I decided to document the steps.

Authentication with Devise and CanCanCan in Rails 8

This is a tutorial on how to set up authentication (verifying who you are) and authorization (what you’re allowed to do) in a Ruby on Rails app using Devise and CanCanCan. We’ll use Rails 8 and Ruby 3.4, and build everything locally—no external auth services required. The code for this tutorial is on GitHub: https://github.com/hibbard-eu/authentication-with-devise-and-cancancan

How to Install Ubuntu Server on VirtualBox

In this post I’ll show you how to install Ubuntu Server 24.04 LTS (Jammy Jellyfish) on Oracle’s VirtualBox. I’ll also demonstrate how to connect to the Ubuntu instance via SSH, as well as how to run VirtualBox in headless mode. Let’s get started!

Fixing Cinnamon Gjs-CRITICAL Errors in Linux Mint After Upgrade

Yesterday, I upgraded from Linux Mint 22 to 22.1 Xia using the Update Manager. The process was smooth enough, but having upgraded my .xsession-errors file started filling up with Gjs-CRITICAL errors. Here’s how I solved the problem.

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…

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…

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,…

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…

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.