A generated image of an impressionist style painting (oil on canvas) of a robot creating another robot.

Building a prompt to generate chatbot persona prompts

I’ve recently been experimenting with the idea of creating a generative AI prompt which can build other prompts for specific personas. Sometimes I know roughly what I want, but I don’t really know all of the required detail of how to describe it. For example, let’s say you want to have a conversation with a Large Language Model (LLM) which directs you to Cognitive Behavioural Therapy (CBT) techniques. You might know that this is what you want, but you might not know all of the detail of how to describe this....

21 December, 2023

Quickly import your ssh public keys from Github with ssh-import-id

There’s a neat Ubuntu command which allows you to easily import your ssh public keys from Github to your server user account. 1 ssh-import-id-gh <github username> By default, it will append the fetched public key (or keys if you specify multiple accounts) to the current user’s ~/.ssh/authorized_keys file. Once you’ve run the above, you will be able to ssh to your server account using the same key you would use to push code to Github. ...

7 June, 2020

Short Variable Names in Go

When I first started learning Go, I heard a lot of people talk about the idiomatic way of doing things. “Sure, that way works, but this is the way we do it in Go.” I’m OK with that - a strict convention can give every piece of code a strong sense of familiarity - and Go has quite a few of these. One such convention is to use short variable names. Variable names in Go should be short rather than long. This is especially true for local variables with limited scope. Prefer c to lineCount. Prefer i to sliceIndex. ...

24 May, 2020

Cache Busting with Jekyll

If you’re running Jekyll and updating styles fairly regularly, you may want to add a cache busting line to your styles and scripts to ensure you (and your visitors) are always accessing the latest version of your assets. ...

9 February, 2020

Murfitt.net is now on Jekyll

This website has been run on various CMSs and frameworks over the years. Joomla, Drupal, Laravel, Symfony…and now Jekyll. ...

7 February, 2020

Creating immutable objects in PHP

You may have seen the \DateTimeImmutable class being used, and wondered why is this different from the \DateTime class? I guess it’s the same…but immutable, right? Why would I want to use an immutable object? Here’s a brief overview. ...

27 January, 2019

Move from Laravel 5.4 to Symfony 4

Hello from Symfony 4! Today I finished the move from Laravel to Symfony 4. The content and design hasn’t moved, but the entire backend has been rewritten using Symfony 4. I’ve managed to keep the content online for well over 10 years, and it’s been running on various versions of Drupal (5, 6, and 7) after being completely rewritten and migrated to Laravel a couple of years ago. A few months ago, I decided to rewrite it again, this time in Symfony....

20 February, 2018

CodeIgniter vs. Laravel

It’s not always easy to give a definite winner with these sorts of comparisons, as depends what your requirements and preferences are. So, here are a few areas worth thinking about when weighing up CodeIgniter against Laravel. ...

8 March, 2016

Outlook for Mac 2011 not working on OS X El Capitan (10.11)

tl;dr - If you use Outlook for Mac and you’re thinking of upgrading to OS X El Capitain, don’t…yet! Edit (Fix): There is an update available now that fixes this problem. You can install it by opening Word, clicking ‘Help’ in the menu bar then clicking ‘Check for updates’. You should see the critical update available. Download, install it, and enjoy Outlook 2011 on your El Capitan Mac :) For more information, visit: https://support.microsoft.com/en-us/kb/3098229 It’s been an eventful day, for all the wrong reasons. Usually my Apple updates go well, but today I discovered that if you try and sync Outlook (running on El Capitan) with an Exchange server, you get a (nice, redesigned) beachball. This is a known bug (https://support.microsoft.com/en-us/kb/3098396), and the official workaround at the moment is to stick to using Yosemite. ...

1 October, 2015

Getting Laravel Homestead to work with larger file uploads

I’ve been working on a Laravel project which uses relatively large file uploads (about 30MB - 120MB). My development environment is Laravel Homestead - a great, pre-packaged Vagrant box for Laravel development. If you haven’t heard of this I highly recommend you check it out - it’s a great way to get up and running with Laravel, but it doesn’t seem to play well for larger file uploads through forms (over about 5MB). My forms were either hanging or returning an nginx ’too large’ error. Here are some of the settings which I’ve had to tweak to get Homestead working nicely with larger uploads. ...

12 January, 2015