#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

  • #8

    Posted on 24th September 2020.

    With only 8 days between this and my previous notes, there isn't much to be writing about. Playstation In just over 2 months I managed to complete the Spiderman game on Playstation 4. Was a great little game and was excellent to be able to start & complete a game successfully. 100%…

  • #7

    Posted on 16th September 2020.

    So this isn't really "#7", it's more #6 part 2 as I am writing them both at the same time. However, this note tries to fill the July - Mid-September void. No Coding July and August kind of saw me down-tools on my side projects while I focused on the house. The…

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.