#4

Behind the Source going well

Behind the Source interviews are going well and are well received. Already on the third interview today and I have had nothing but positive comments. Fortunately it is all set up beforehand, so there is minimal work each week to get it live. Unfortunately, Mailchimp have taken away the scheduling for free accounts, otherwise I could do it all automated. I'm using Figma to create the social media images (if I had more than 8 interviews I would have automated this with the command line and ImageMagick).

Apache Macros

I discovered Apache Macros recently and they changed my life. They essentially allow you to "include" a template from another Apache file. To give context, I have a sever where all my sites are set up the same. The only difference between them is the location of the "site root" and where the SSL certificate lives (and a few other bits). Excuse the brevity in the examples, this is mainly for me to remember!

Using Apache Macros, I am able to add the following to a file in /etc/apache2/conf-available:

<Macro VHost80 $sub $parent>
    ### Virtual host configuration ###
    ServerName $sub.$parent
    VirtualDocumentRoot /var/www/$parent/$sub.$parent/html
</Macro>

The first line declares the variable, assigns a name and sets out the variables used, while the rest is what you want to be included.

I can then "enable" that file and call it in my Apache site file, filling in the variables and making updates & new site launches a lot easier (it also forces me to keep my server structured).

<VirtualHost *:80>
    Use VHost80 www mikestreety.co.uk # www = $sub, mikestreety.co.uk = $parent
</VirtualHost>

email.subscribeto facelift

With Behind the Source re-energising my passion for side projects, I thought I would turn my attention back to email.subscribeto.at. The current tech stack was built with "prototype and push it live" in mind. I am currently in the process of re-building the backend with CraftCMS, so I am able to manage the content better and easier. So fare I've learnt a lot about extending Craft, including Twig Extensions, Behaviours and custom functions. I'll try and write a blog post about it when I understand it more!

You might also enjoy

  • #5

    Posted on 6th June 2020.

    Black lives matter This week in America, riots and protests have happened across the country (and world) after the death murder of an unarmed Black man by a white police officer. It has really made me check my privilege and I am making sure I am educating myself on racism and…

  • The Git Commit Hash

    Posted on 28th May 2020.

    The magic 40 character string that is attached to every commit you do. What is it, where does it come from and will understanding it help you with Git in the future?…

  • #3

    Posted on 1st May 2020.

    Lockdown continuesI don't think I've mentioned this in blogs or notes before, but the UK is currently on lockdown. Since 18th March, Liquid Light have been a fully remote company - we had to quickly adapt to working in an office to all being in our own homes. It's a…

  • Why should you consider Cloudflare for your website?

    Posted on 20th April 2020. Written For Liquid Light

    Cloudflare is a service which, among other things, provides a CDN (Content Delivery Network), firewall, and performance layer for your website. It has plenty of paid upgrades and features and is a developer’s dream, but what advantage does it have for you to put your website “behind” Cloudflare and how…

    Web
  • #2

    Posted on 19th April 2020.

    New Site If you have come here before you would have noticed there is now a new face to my blog. More space, better fonts & (in my opinion) just generally nicer. I wrote a "timeline/history" about the blog/my site and dug up some Internet Archive links for each step. You can…

Mike Street

Written by Mike Street

Mike is a front-end developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Twitter.