Applying .gitignore Change to a Repository

A great feature of git is the ability to mark certain file and folders as being excluded from the repository which is done via entries in the .gitignore file.

One issue I regularly have is when things change and I need to update the .gitignore file and I always forget how to apply that change. That’s because it is something that isn’t obvious or something that I do regularly. Fortunately it is incredibly easy to achieve and here’s how…

How to apply .gitignore changes

Assuming that you have already edited and made your changes to .gitignore the next this to … Read the rest

Styling Codeigniter form error messages

As I get more and more deeply involved in using Codeigniter for my projects I discover bits and pieces that I think might be useful to others.

Today is a very quick tip about styling the error messages that are thrown on a form. Looking at the statement that you have in your view it isn’t immediately obvious how you apply any styling to this at all.

echo form_error('file');

The answer, strangely, is to apply the look and feel through a call to set_error_delimiters in your controller and not in the view. The function takes two parameters: the html code … Read the rest

Slush ‘19

A bit of a departure for the blog this week as I am currently away in Finland for the annual Slush event. As it is primarily a technology event I thought it would fit here.

Slush styles itself as the world’s leading startup event and takes place in Helsinki every November. The event name and the location suggest that we might be knee deep in wet snow but actually when we arrived on Wednesday it was warmer than the UK we had just left.

Having not been before it was difficult to know just what to expect but what I … Read the rest

The Paperlike2 for iPad

If there is any gadget related job worse than cleanly applying a screen protector to a device I don’t know what it is. So it was with mixed emotions when my Paperlike2 arrived in the post this morning.

Paperlike2 is yet another Kickstarter project but one that had a higher chance of success as it it the follow-up to, of course, Paperlike. Basically Paperlike is an iPad screen protector that adds a slightly course layer on top of the screen making it more, well, paper like, and better for writing and drawing.

Application

But before you can get to the … Read the rest

Why Silence Unknown Callers is the Best Feature in iOS13

I’ve had a bit of a love/hate relationship with the latest iteration of Apple’s mobile operating system with some pretty irritating bugs (although nowhere near as bad as the awful macOS Catalina release). However, there is one feature that I do love – Silence Unknown Callers (SUC).

The feature does pretty much what it says on the tin and at first seems something of a blunt instrument especially as it appears to only be on or off. There is, however, quite a bit of subtlety behind this toggle switch.

Why would you want to turn on SUC? Simply to reduce … Read the rest

Accessing Local Resources over the Internet with Packetriot

When I am doing any development, such as for PostRecycler, I do the coding on my laptop running Apache, PHP and MySQL locally via MAMP. This is fine until I need to share work with others which means I have to either upload the work onto a public server or do it via screen sharing. Neither are particularly ideal.

I was vaguely aware of the service ngrok which allows you to expose your local services on the web and then, via Reddit, saw the similar service Packetriot which does a similar thing so I thought I would give … Read the rest

In the Days Before Digital Downloads

Digging through some old papers I came across a letter that I wrote to the magazine Your Computer in 1981 when I would have been 16.

What’s interesting about this historical artifact is not that it was hand written and sent through the post on paper (although that is certainly unusual these days). No it is that it contains a submission for publication of a program that I’d written.

It’s hard to believe in these days of digital software downloads that there was a time when programs were small enough that they could be printed in magazines and people actually … Read the rest

My Everyday Carry (edc)

Everyday Carry, as defined by wikipedia, are useful items that are consistently carried on person every day. It has become something of a movement with people showing off their own edc which, in many cases regrettably, seems to include a knife.

Always one to jump on a bandwagon when it is passing I thought that I would present to you my minimalist edc which you can see above and includes:

A couple of these items (Spooly and Mu) have been sourced from Kickstarter projects. I have to … Read the rest

How to pass multiple parameters in and out of PHP functions

At some point in your PHP development you are likely to want to break repeated functionality out into a separate, well, function. Something that you’ll no doubt also want to do is pass information back and forward from these functions.

If you are familiar with scope in programming you will be aware that variables are typically only available where they are created. This means if you create a variable called $name in the main part of your code you would not be able to “see” this variable in a function unless you passed it across. The scope of the variable … Read the rest

HyperCube: Auto Photo Backup USB Device

The HyperCube is another Kickstarter project but unlike the tardy Spooly this one went from completion on 16th July to delivery in just eight weeks which must be some sort of record for projects I have backed.

The HyperCube’s premise is simple. It’s a USB dongle that allows you to backup multiple device’s photos and videos to some connected media while simultaneously charging. That media could be a microSD card, a USB stick or even an external hard drive. The idea is that it makes backup simple and could replace services such as iCloud thereby saving you money.

The Dongle

Read the rest