A Minor Update to my Bluesky Library

A quick post to say that my Bluesky library has had a small update. This is to take into account that from version two of Clark’s library that handles the calls to Bluesky the connection method has changed. Therefore, if you have updated to version two then remember also to update the PHP2Bluesky code which can be found here.

You can read all the posts on the PHP2Bluesky library here and get in touch if you find any issues or have an enhancement suggestion.… Read the rest

Automatically Restarting Unresponsive MySQL Service

This blog and others that I run are all hosted on a cloud server with MySQL installed locally. Occasionally MySQL becomes unresponsive and I have to login to the server to kick it back into life by restarting msqld.

The most likely reason for MySQL becoming unresponsive is lack of resources so the best solution would be to increase the size of the server – however, that requires money that I don’t want to spend. Therefore, the next best option was to write a script to detect when MySQL was unavailable. Enter mysqladmin.

mysqladmin — A MySQL Server Administration Program

Read the rest

Working out my credit card statement date in Excel

This might be the most niche post I have ever done but I hope that it might prove useful to someone.

My credit card bill gets made up on or around the tenth of each month but, for reasons I won’t go into here, I needed to much more accurately predict when it was actually going to be created. Through a combination of searching and testing, I discovered that in my case it is always made up on the sixth working day of the month. Turns out that there is an Excel (and Google Sheets) function that can help with … Read the rest

Exporting all WordPress Posts to PDF

I had a requirement to export all my WordPress blog posts into a nicely formatted PDF file and so I looked at plugins that were available to do the job, of which there are a few. I tried some and none worked for me giving no output at all so I decided I would roll my own. Here’s how you can use that code to download your posts to PDF too. You can see an example of the output at the bottom of the post.

To do this required two things: accessing my posts via the WordPress API and … Read the rest

Day One Encryption

TL;DR the Day One local database is not encrypted.

After my last post on querying the Day One database, I was asked the question: what happens if you have your journals encrypted?

Before we get into that, let’s look at the Day One encryption options. You can turn on encryption on a journal-by-journal basis and it is on by default. This must have changed at some point as my original journal is not encrypted and newer ones are. Despite being able to choose which journals are encrypted and which aren’t selectively there is only one encryption key meaning that … Read the rest

The Move from LastPass is Complete

In December 2022 LastPass announced to their users that they had been subject to a data breach. This led me to consider moving to another password manager which I did, settling on 1Password.

I transferred over 1,700 passwords and I calculated that changing an average of three a day was going to take me a year and a half to change them all. Well, it has been somewhat quicker than that as I have finished! In doing so I have reduced the number from 1,700 to 677.

I thought that it might be useful to know what I did … Read the rest

Querying the Day One Database

WARNING! Make a copy of your database before trying any of this!

Why do it?

I have been using the Day One journaling app to keep a daily personal diary for many years now. I have been recording my mundane thoughts there for over seven years and have transcribed five paper diaries too giving me a total of 14 year held there.

That’s currently 4,267 entries and counting of which I know very little about other than the text itself. I wanted more detail than Day One offered and had ideas of how I could mine my entries in … Read the rest

Changing the Default PHP Version in MAMP

When doing any development on my laptop I use the very useful MAMP to give me an xAMP (Apache, MySQL & PHP) environment.

I recently upgraded and found that the free version offers two versions of PHP: 7.4.33 and 8.2.0 which would be fine but my production server is still on 8.1 and so I needed to match that. I could have upgraded to MAMP Pro but £90 just to switch to PHP 8.1 seemed a bit much, although, I do appreciate that by doing so I would be supporting the developers.

Changing the PHP Versions in MAMP Free Edition

Read the rest

Will Chromium give Microsoft the Edge?

Having dominated the browser world and making developers lives a misery with Internet Explorer Microsoft are now adapting to a new world order by adopting a competitors browser.

IE, A Short History

There was a time when Internet Explorer (from now on referred to as IE) ruled the world when it came to browsing the web. Then along came Chrome (and to a lesser extent Firefox) and there was a mass exodus from IE. IE now only accounts for just over 6% of traffic while Chrome has 47%.

With Windows 10 Microsoft introduced Edge as it’s browser going forward but … Read the rest

Text Expansion with Alfred

I’ve had my MacBook Air for over five years now and by and large it is still performing pretty well. Certainly better after that time than any Windows machines I’ve had in the past would have done.

Just recently, though, I’d been having a performance problem which led me to do a root and branch check of my machine (turned out it was the Sophos Home Virus scanner). As part of this I stumbled upon the fact that Alfred can do text expansion and this left me to wonder whether it was worth having two programs sat in the background … Read the rest