Docker Lab – Containerising your website, Part 4 (Let’s Encrypt)

If you’ve been following along with this series of tutorials, you’ll have built a LEMP stack capable of handling multiple vhosts. That’s all very well – but if you expect your users to enter their username and password into the site then you’ll need to provide them with a little security. The only way to do that is with ssl, certificates for which used to be pricey or came with strings attached.

Let’s Encrypt is a certificate authority started by the Electronic Frontier Foundation, Mozilla Foundation, University of Michigan, Akamai Technologies and Cisco Systems to provide ssl certificates for free, and to simplify the process of securing your website into the bargain. They take donations though – and this is one project that you really should consider supporting. Continue reading “Docker Lab – Containerising your website, Part 4 (Let’s Encrypt)”

Docker Lab – Containerising your website, Part 2 (PHP)

In the previous instalment (Docker Lab – Containerising your website, Part 1), we installed Docker and Docker Compose, and set up an Nginx container. If all you need is to serve a few static pages there’s no need to read any further. But if you need your website to be dynamic, if you need PHP and, perhaps, a database, read on…

These instructions assume that you have followed the steps in part 1. Continue reading “Docker Lab – Containerising your website, Part 2 (PHP)”

Docker Lab – Containerising your website, Part 1 (Nginx)

For many years now, 45RPMSoftware has maintained its own webservers (hosted on virtual machines by Rackspace).  These webservers have been set up in the ‘traditional’ manner, with a LAMP (Linux, Apache, MySQL, PHP) stack.  They’ve worked well and so I’ve ignored them, which isn’t the right way to run a website and especially not one which hosts your business.For many years now, 45RPMSoftware has maintained its own webservers (hosted on virtual machines by Rackspace).  These webservers have been set up in the ‘traditional’ manner, with a LAMP (Linux, Apache, MySQL, PHP) stack.  They’ve worked well and so I’ve ignored them, which isn’t the right way to run a website and especially not one which hosts your business. Continue reading “Docker Lab – Containerising your website, Part 1 (Nginx)”

NSString – components separated by case insensitive string

The latest version of MailRaider greatly improves its handling of base64 encoded or quoted printable strings – the previous version could get confused if, for example, it encountered ‘=?UTF-8?B?’ instead of ‘=?utf-8?b?’. The problem is that NSString only has componentsSeparatedByString – which isn’t much use if you don’t know what case to expect. Hmm. Continue reading “NSString – components separated by case insensitive string”

A Calculator For Your micro:bit

You may remember that, a little over a year ago, I wrote a clock for the micro:bit (read it again here if you need a reminder).  I pondered adding alarm functionality to it but, in the event, I didn’t get around to it. In keeping with that tradition, I now offer you a calculator for the micro:bit – this one has unimplemented improvements too!

I run a computer club for the kids at the local school where we teach them how to code – free from the constraints of the National Curriculum. It’s no secret that I don’t like Scratch, and I think that one of the reasons that the British Isles produced so many great coders is because they learned Basic on the ZX Spectrum and BBC computers from an early age. Continue reading “A Calculator For Your micro:bit”

Object Oriented C – Encapsulation

If you haven’t read my earlier articles on Object Oriented Programming in C (Objects and Polymorphism) I suggest that you go back and read these first.  It isn’t necessary to understand these concepts in order to understand Encapsulation – but it might help give you some background into what I am attempting to achieve here.

To recap, Encapsulation is a means of preventing access to internal object data, ensuring that the data can only be accessed and modified via methods. That’s not to say the internal object data can never be manipulated directly – but one has the option to decide how best the data should be accessed. In explicitly OOP languages this is often achieved through the use of the ‘private’, ‘public’ and ‘protected’ keywords. Continue reading “Object Oriented C – Encapsulation”

Retro Computer – Modern Internet

Like many geeks I love old technology. I also like to push my technology to new heights and, if possible, make it usable in the modern world. Nearly all of my old computers are networked and, theoretically at least, able to browse the Internet. In practice though Gopher is the most usable standard nowadays since SSL tends to render most email servers and websites unusable. Even if it didn’t, Javascript has changed almost beyond recognition from its nascent days in mid nineties – and don’t even think of rendering HTML5! Continue reading “Retro Computer – Modern Internet”

Object Oriented C – Polymorphism

If you haven’t yet read ‘Object Oriented C – Objects‘ Stop! Go Back! Go and read that earlier post before continuing. In this post I build on the earlier concepts, so much of this won’t make sense without it.

In my last tutorial, I demonstrated that it is possible to write Object Oriented code in C. I wrote some classes, and instantiated objects on those classes. I even made a start on sorting out C’s hopeless string handling (before giving up because others have already solved the problem). This time I’m going to extend the tutorial to cover Polymorphism. Continue reading “Object Oriented C – Polymorphism”

Bill’s Will

I went to an excellent boarding school called Adams’ Grammar School.  It was nothing like Hogwarts – in fact, to pinch an elegant turn of phrase from Guy Ellis, it was more like a Borstall run by Liberals.  In the nicest possible way – I mean it fondly, and I think that Guy does too.

When we provoked the Masters or Prefects then one punishment that might have been handed down was ‘Bill’s Will’.  A simple enough task, all we had to do was copy out the Will of William Adams, as laid out on the boards on the walls of Big School.  Sadly, this punishment has been lost to history – a pity because it was more stimulating and educational than merely doing lines. Continue reading “Bill’s Will”