[{"metadata":{"article_title":"Testing StaticPHP","article_description":"Let's take a look at how I test my static site generator software, to make sure things work as expected.","article_author":"David Hunter","article_date":"2025-08-18","article_time":"15:00","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2025\/08\/18\/testing-staticphp\/"},"fileContents":"\n<p>--- metadata.article_description ---<\/p>\n\n<h3>Test Mode<\/h3>\n\n<p>Since StaticPHP has so many features now, it would be very easy to start implementing a new feature, get it working, and something completely unrelated stops working or doesn't work as effectively as it used to.<\/p>\n\n<p>To help protect against things failing, or to some extent not working in the way they should, I added a testing suite directly into StaticPHP, called Test Mode, and anyone can use it.<\/p>\n\n<h3>How does it work?<\/h3>\n\n<p>There are three folders\/directories that the test suite uses, <code>input<\/code>, <code>output<\/code>, and <code>expected<\/code>. These can of course be customised in your launcher configuration.<\/p>\n\n<p>StaticPHP functions pretty normally. It takes what is in the input directory, and gives an output in the output directory. Except there is one extra stage the test suite goes through, it compares the generated output with the equivilant file in the expected directory, and uses that to determine the outcome of that particular test.<\/p>\n\n<h3>Test Results<\/h3>\n\n<p>StaticPHP will display a full log output in the terminal\/console as it normally does, and at the end will display a count of how many tests were a success, how many failed, and how many were unknown. Each output file is prefixed with the test outcome to help see which ones need attention. An optional file can be generated displaying this result more visually.<\/p>\n\n<h3>Are all features tested?<\/h3>\n\n<p>I do my best to test as many features as I can, and to test as many bugs as I find and reproduce, but due to the nature of StaticPHP being generic so that it can be suited to as many projects and situations as possible, it may not be possible to test for everything.<\/p>\n\n<h3>Want to find out more about StaticPHP?<\/h3>\n\n<p>Head on over to the StaticPHP website.<\/p>\n\n<p><a href=\"https:\/\/weburl.net\/staticphp\" target=\"_blank\">weburl.net\/staticphp<\/a><\/p>","outputContent":"\n    <article>\n        <h3 class=\"title\">Testing StaticPHP<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2025-08-18 at 15:00.<\/p>\n        <p class=\"description\">Let's take a look at how I test my static site generator software, to make sure things work as expected.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2025\/08\/18\/testing-staticphp\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Server Management Tutorials","article_description":"Learn how to manage your servers using these tutorials.","article_author":"David Hunter","article_date":"2024-05-17","article_time":"14:15","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2024\/05\/17\/server-management-tutorials\/"},"fileContents":"\n<p>--- metadata.article_description ---<\/p>\n\n<p>Debian-Based Linux Servers<\/p>\n\n<ul>\n    <li><a href=\"\/assets\/text\/Secure-and-Manage-a-Debian-Based-Linux-Server-Tutorial.txt\" target=\"_blank\">SECURE AND MANAGE A DEBIAN-BASED LINUX SERVER - TUTORIAL<\/a><\/li>\n    <li><a href=\"\/assets\/text\/Debian-Based-Linux-Web-Server-using-Apache-Tutorial.txt\" target=\"_blank\">DEBIAN-BASED LINUX WEB SERVER USING APACHE - TUTORIAL<\/a><\/li>\n<\/ul>\n\n<p>I do hope these tutorials have been useful to you. Feel free to provide me with feedback. :)<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Server Management Tutorials<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2024-05-17 at 14:15.<\/p>\n        <p class=\"description\">Learn how to manage your servers using these tutorials.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2024\/05\/17\/server-management-tutorials\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Change Author on Git Commits on Entire GitHub Repository","article_description":"Learn how to change the email address and name on all commits in a GitHub-Hosted Repository.","article_author":"David Hunter","article_date":"2023-12-27","article_time":"16:30","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2023\/12\/27\/change-author-on-git-commits-on-entire-github-repository\/"},"fileContents":"\n--- metadata.article_description ---\n\n<h2>Step One: Clone Repository as Bare<\/h2>\n\n<p>Most people host their repository on a remote hosting service like GitHub. This article will assume you have a Git repository hosted on GitHub.<\/p>\n\n<p>Even if you have the repository already on your machine, you need to clone it again as a bare repository for this to work.<\/p>\n\n<p><code>git clone --bare git@github.com:username\/repository.git<\/code><\/p>\n\n<p>This will clone the repository and put it in a folder of the same name with .git on the end to indicate it is a bare repository. If you specified an optional dir name at the end of the above comand, the folder name will be exactly that.<\/p>\n\n<h2>Step Two: Run Script to Change Author Info<\/h2>\n\n<p>Below is a script you can run to change the author details. It works by finding all commits with the old info, and updating that info with the new details.<\/p>\n\n<p>Firstly though, you must change the parts at the top of the script to match your situation.<\/p>\n\n<pre><code>git filter-branch --env-filter '\nOLD_EMAIL=\"your.name@email.tld\"\nCORRECT_NAME=\"Your Name\"\nCORRECT_EMAIL=\"your.name@newemail.tld\"\nif [ \"$GIT_COMMITTER_EMAIL\" = \"$OLD_EMAIL\" ]\nthen\n    export GIT_COMMITTER_NAME=\"$CORRECT_NAME\"\n    export GIT_COMMITTER_EMAIL=\"$CORRECT_EMAIL\"\nfi\nif [ \"$GIT_AUTHOR_EMAIL\" = \"$OLD_EMAIL\" ]\nthen\n    export GIT_AUTHOR_NAME=\"$CORRECT_NAME\"\n    export GIT_AUTHOR_EMAIL=\"$CORRECT_EMAIL\"\nfi\n' --tag-name-filter cat -- --branches --tags\n<\/code><\/pre>\n\n<p>Copy the above into a text editor of your choice. Modify the details at the top, and then copy and paste it into your terminal \/ command prompt and hit enter to run the script.<\/p>\n\n<p>You may get a warning, in my experience it is usually safe to ignore this warning. After a moment, it should start rewriting all the commits in the repository.<\/p>\n\n<p>Confirm these have changed successfully by checking the log.<\/p>\n\n<p><code>git log<\/code><\/p>\n\n<h2>Step Three: Push To Remote<\/h2>\n\n<p>To make sure these changes take effect not only in our local repository but also our remote one on GitHub, we need to push them to GitHub.<\/p>\n\n<p>Since we made changes to existing commits, we need to forcefully push these changes to GitHub.<\/p>\n\n<p><code>git push --force --tags origin 'refs\/heads\/*'<\/code><\/p>\n\n<p>Note that the 'origin' above refers to whatever name you have given your remote, if you have not changed this it will be 'origin' otherwise you will need to update this to match the correct remote name in your case.<\/p>\n\n<p>Once you have executed the above command, you can safely remove the repository directory from your machine.<\/p>\n\n<p>If you already had the repository on your machine before making these changes, to make sure the changes properly reflect that, you may want to delete the repository directory and re-clone it as you normally would.<\/p>\n\n<p>Happy Gitting!<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Change Author on Git Commits on Entire GitHub Repository<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2023-12-27 at 16:30.<\/p>\n        <p class=\"description\">Learn how to change the email address and name on all commits in a GitHub-Hosted Repository.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2023\/12\/27\/change-author-on-git-commits-on-entire-github-repository\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Watch Now: Graduation 2012","article_description":"This was one of my proudest moments, and after over a decade later, I want to share and remember this moment that luckily enough was caught on camera.","article_author":"David Hunter","article_date":"2023-08-06","article_time":"00:55","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2023\/08\/06\/watch-now-graduation-2012\/"},"fileContents":"\n<p>Back in 2012, I graduated Kilmarnock College with a Higher National Certificate in Computing Software Development.<\/p>\n\n<p>This was one of my proudest moments, and after over a decade later, I want to share and remember this moment that luckily enough was caught on camera.<\/p>\n\n<p>Duration: 1 minute and 39 seconds<\/p>\n\n<video class=\"video\" poster=\"--- metadata.images_url ---\/videos\/Gradulation2012-ProVersion-Thumb.png\" preload=\"none\" controls>\n    <source src=\"--- metadata.videos_url ---\/kilmarnockcollege_graduation_2012.mp4\" type=\"video\/mp4\">\n<\/video>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Watch Now: Graduation 2012<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2023-08-06 at 00:55.<\/p>\n        <p class=\"description\">This was one of my proudest moments, and after over a decade later, I want to share and remember this moment that luckily enough was caught on camera.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2023\/08\/06\/watch-now-graduation-2012\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Sleepless Night - A Short Film","article_description":"This is my very first short film I produced entirely by myself in my bedroom. Hopefully you like it.","article_author":"David Hunter","article_date":"2023-07-19","article_time":"18:00","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2023\/07\/19\/sleepless-night-a-short-film\/"},"fileContents":"\n<video class=\"video\" poster=\"--- metadata.images_url ---\/videos\/SleeplessNight-Thumb.png\" preload=\"none\" controls>\n    <source src=\"--- metadata.videos_url ---\/sleepless-night-a-short-film.mp4\" type=\"video\/mp4\">\n<\/video>\n\n<p>This is my very first short film I produced entirely by myself in my bedroom. Hopefully you like it.<\/p>\n\n<p>Duration: 2 minutes and 5 seconds<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Sleepless Night - A Short Film<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2023-07-19 at 18:00.<\/p>\n        <p class=\"description\">This is my very first short film I produced entirely by myself in my bedroom. Hopefully you like it.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2023\/07\/19\/sleepless-night-a-short-film\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Harden the Security of Apache on Debian based Systems","article_description":"Apache is the software used to run a web server, but default installation isn't that secure. Let's harden it!","article_author":"David Hunter","article_date":"2023-02-02","article_time":"21:21","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2023\/02\/02\/harden-the-security-of-apache-on-debian-based-systems\/"},"fileContents":"\n<p>Apache is the software used to run a web server, but default installation isn't that secure. Let's harden it!<\/p>\n\n<h3>Remove Apache Version<\/h3>\n\n<p>Open your web browser, go to a site hosted on your server, right click and inspect. Go to the Network tab, you may need to reload the page, then view the response of the page you are accessing, and you should see somewhere that you are using Apache and a version number, and even the Operating System you are using.<\/p>\n\n<p>Its just a number, right? Wrong! It gives attackers the precise Apache version you are using, which means if they know of a vulnerability in that specific version, they can take advantage of that, and who knows where that might lead. Same goes for the Operating System name, they could use that against you too.<\/p>\n\n<p>The only person that needs to know this information is you and any other members of your team that do a similar job to you. Outside of that, no one needs to know this, so lets hide it.<\/p>\n\n<p><b>Step 1:<\/b> Open the Apache config file using your favourite text editor (e.g. Nano).<\/p>\n<p><code>sudo nano \/etc\/apache2\/apache2.conf<\/code><\/p>\n<p><b>Step 2:<\/b> Go down to the bottom of the file, add a comment so you know this is your modification, then add the following lines.<\/p>\n\n<pre><code>ServerTokens Prod\nServerSignature Off<\/code><\/pre>\n\n<p>\n    <b>ServerTokens:<\/b> set this to <code>Prod<\/code> so that the header is production only, therefore only displaying Apache.\n    <br>\n    <b>ServerSignature:<\/b> set this to <code>Off<\/code> so that the version information is hidden.\n<\/p>\n\n<p><b>Step 3:<\/b> Save the file and restart Apache: <code>sudo systemctl restart apache2<\/code><\/p>\n\n<h3>Disable Directory Index Listing<\/h3>\n\n<p>By default, if you browse to a directory that is empty or has no index file, the contents of that directory will be displayed. This could reveal sensitive parts of your site and be more of a vulnerability than a helping hand. Here is how you disable it.<\/p>\n\n<p><b>Step 1:<\/b> Open the Apache config file using your favourite text editor (e.g. Nano).<\/p>\n<p><code>sudo nano \/etc\/apache2\/apache2.conf<\/code><\/p>\n<p><b>Step 2:<\/b> Look for the Directory directives and find the one that matches the path for the <code>www<\/code> directory. It should look like the following.<\/p>\n\n<pre><code>&lt;Directory \/var\/www\/&gt;\n    # ...\n&lt;\/Directory&gt;<\/code><\/pre>\n\n<p><b>Step 3:<\/b> If an <code>Option<\/code> exists for <code>Indexes<\/code>, ensure it is set to <code>-Indexes<\/code>. The minus negates it to ensure it is disabled. Apache will complain if there are other options without a + or - before them, so either remove the other options or ensure they have a + or - accordingly.<\/p>\n\n<p><b>Step 4:<\/b> Save the file and restart Apache.<\/p>\n<p><code>sudo systemctl restart apache2<\/code><\/p>\n\n<p><b>Step 5:<\/b> Create an empty directory on your site, attempt to visit it and you should now get the default Apache error 403 Forbidden message. Also if you followed the previous section, the Apache version should be hidden from this page too. You can delete that empty directory if you wish now, as it was only for testing.<\/p>\n\n<h3>Etag<\/h3>\n\n<p>This allows remote attackers to gain access to some sensitive information about your server, such as inode number, multipart MIME boundary, and child process through the Etag header.<\/p>\n\n<p>It is also a required fix for PCI compliance, but regardless a good fix to implement.<\/p>\n\n<p><b>Step 1:<\/b> Open the Apache config file using your favourite text editor (e.g. Nano).<\/p>\n<p><code>sudo nano \/etc\/apache2\/apache2.conf<\/code><\/p>\n\n<p><b>Step 2:<\/b> Scroll down to the bottom to where your custom directives are, and add the following line to the file.<\/p>\n<p><code>FileETag None<\/code><\/p>\n\n<p><b>Step 3:<\/b> Save the file and restart Apache.<\/p>\n<p><code>sudo systemctl restart apache2<\/code><\/p>\n\n<h3>Run Apache form a Non-Privileged Account<\/h3>\n\n<p>By default, Apache may run as a special user account, and this could be used by an attacker to cause problems for your site or even your system. It is highly recommended you ensure it runs as a non-privileged user to help protect against this.<\/p>\n\n<p><b>Step 1:<\/b> Decide on the name of the user that apache will run as. For this tutorial, I will use <code>apache<\/code>.<\/p>\n<p><b>Step 2:<\/b> Add a user and group called <code>apache<\/code> with the following commands.<\/p>\n\n<pre><code>sudo groupadd apache\nsudo useradd -g apache apache<\/code><\/pre>\n\n<p>Remember to swap out <code>apache<\/code> for the user name you chose if you decided on a different one.<\/p>\n\n<p><b>Step 3:<\/b> Find your Apache installation directory.<\/p>\n<p><code>sudo which apache2<\/code><\/p>\n\n<p><b>Step 4:<\/b> Change ownership of the Apache installation directory to that of the new user and group you just created.<\/p>\n<p><code>sudo chown -R apache:apache \/path\/to\/apache<\/code><\/p>\n\n<p>Swap <code>apache<\/code> for your chosen user name, and <code>\/path\/to\/apache<\/code> to the path returned by the previous command.<\/p>\n\n<p><b>Step 5:<\/b> Modify the Apache Environment Variables file to set the new user and group.<\/p>\n\n<pre><code>sudo nano \/etc\/apache2\/envvars\n\nexport APACHE_RUN_USER=apache\nexport APACHE_RUN_GROUP=apache<\/code><\/pre>\n\n<p>Find the export lines shown above and change the values to the user name and group you created earlier.<\/p>\n\n<p><b>Step 6:<\/b> Save the file and restart Apache.<\/p>\n<p><code>sudo systemctl restart apache2<\/code><\/p>\n\n<h3>Limit HTTP Request Methods<\/h3>\n\n<p>By default, Apache can accept many different request methods, most of which are not needed for the majority of sites, so its best to limit these to the ones you will likely need.<\/p>\n\n<p><b>Step 1:<\/b> Open the Apache config file using your favourite text editor (e.g. Nano).<\/p>\n<p><code>sudo nano \/etc\/apache2\/apache2.conf<\/code><\/p>\n\n<p><b>Step 2:<\/b> Find the root Directory section, and inside that add the following.<\/p>\n\n<pre><code>&lt;LimitExcept GET POST HEAD&gt;\n    Deny from All\n&lt;\/LimitExcept&gt;<\/code><\/pre>\n\n<p>Change <code>GET POST HEAD<\/code> to the request methods you need. In most cases, these three will be fine.<\/p>\n\n<p><b>Step 3:<\/b> Save the file and restart Apache.<\/p>\n<p><code>sudo systemctl restart apache2<\/code><\/p>\n\n<h3>Conclusion<\/h3>\n\n<p>That is about all I have for you for now. I hope it was useful to you. Please check back in the future to remind yourself of these steps and in case I happen to add more.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Harden the Security of Apache on Debian based Systems<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2023-02-02 at 21:21.<\/p>\n        <p class=\"description\">Apache is the software used to run a web server, but default installation isn't that secure. Let's harden it!<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2023\/02\/02\/harden-the-security-of-apache-on-debian-based-systems\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"New Wallpaper for your Desktop","article_description":"Check out this new wallpaper I made for my own desktop and want to share it with you.","article_author":"David Hunter","article_date":"2022-12-29","article_time":"17:00","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/12\/29\/new-wallpaper-for-your-desktop\/"},"fileContents":"\n<p>Check out this new wallpaper I made for my own desktop and want to share it with you.<\/p>\n\n<p><img src=\"--- metadata.images_url ---\/wallpapers\/davidhunter_website_url_dark_desktop_1.png\" alt=\"David Hunter Website URL Dark Desktop Wallpaper Image\"><\/p>\n\n<p>You can right click on it with your mouse and choose save as to download it to your computer, or press and hold with your finger on mobile devices and save to your gallery\/photos or files to download it on a mobile device.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">New Wallpaper for your Desktop<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-12-29 at 17:00.<\/p>\n        <p class=\"description\">Check out this new wallpaper I made for my own desktop and want to share it with you.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/12\/29\/new-wallpaper-for-your-desktop\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Coming in 2023...","article_description":"In this blog article, I will lay out what I hope the new year will bring.","article_author":"David Hunter","article_date":"2022-12-28","article_time":"19:00","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/12\/28\/coming-in-2023\/"},"fileContents":"\n<p>In this blog article, I will lay out what I hope the new year will bring.<\/p>\n\n<h3>A Look Back at 2022<\/h3>\n\n<p>The year started off kinda rocky, with pressures increasing and mental health and wellbeing decreasing. Towards the middle of the year, things started to settle and become more stable and manageable, and then the issues became practically non-existant towards the end of the year.<\/p>\n\n<p>I somehow found the motivation to clean out a whole heap of stuff I no longer needed from my bedroom. Heap is probably too small a word when you look at how much was cleaned out, but it will do for now. I had stuff dating back to primary school, which certainly wasn't yesterday, and just shows how badly I needed to get this done. Most of the old stuff is gone now, and my room is much more organised than it has been in the past couple of decades.<\/p>\n\n<p>Also in 2022, I explored some older technologies that were once part of my life until replaced by newer technologies. Just because something is old and has a better replacement, doesn't mean its no good. I wanted to go back to these older technologies and explore them better, so I started playing some of my parent's old Vinyl Records and Cassette Tapes, and some of my old Video Tapes. For christmas this year, I treated myself to a new cassette player and video player so I could try out these formats again. I also wanted to go back to old gaming consoles, so I treated myself to a couple of PlayStation consoles, the first one and the second one, along with some games to play.<\/p>\n\n<p>Over the course of several months, I was looking into the benefits to having static sites online. Most of my web projects are mostly static, meaning they only change when I change the code and publish it, and I often used PHP to keep the same design across the entire site, and that PHP code was executed upon every page request. This is bad practice and so I wanted to change it. I had heard of Static Site Generators and found out they let you code in a dynamic way to do things like keep the same design on every page and loop though content to save duplicate code and to make development easier, exactly like how I had been doing with PHP, so for a while now, my web projects have been entirely static, and the only content on the servers is the generated finished result. No PHP execution, just the server sending the content to the user requesting it. This saves time and computational power which both increases the user experience and also saves money for the developers and site owners.<\/p>\n\n<h3>Moving forward and into 2023<\/h3>\n\n<p>I plan on continuing what I have already started in 2022. My bedroom will hopefully get a complete makeover by the end of 2023, I will continue expanding my collection of Vinyl Records, Cassette Tapes, and Video Tapes, as well as continuing to play old games on the PS1 and PS2.<\/p>\n\n<p>Hopefully if I continue to save money like I have been doing, I will afford to get new Laptop and Desktop computers, because they both are in need of an upgrade. Laptop dates back to 2012 so is more than a decade old now and is extremely slow and battery doesn't work anymore, and my desktop dating back to 2015 if memory serves me, cos its not really as fast as it should be, and isn't really suited to the computational needs of today. With more power, I can get more done both cos the machines themselves will be faster but also because they are more powerful. I also want to explore virtualisation technologies more, and to do that I need a really decent computer with a bit of power as I may need to run multiple virtual machines at once on the same host machine.<\/p>\n\n<p>Assuming the negative things from 2022 don't come back in 2023, then I also see me doing more web-based projects to practice my skills in both Web Design and Web Development, with a higher focus on Front End projects and static content.<\/p>\n\n<h3>Conclusion<\/h3>\n\n<p>Regardless of what happens, all I hope for is good health for everyone and for things to go well. Hopefully things turn out as I plan.<\/p>\n\n<p>Keep an eye on this blog for more updates on how things are going. Take care.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Coming in 2023...<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-12-28 at 19:00.<\/p>\n        <p class=\"description\">In this blog article, I will lay out what I hope the new year will bring.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/12\/28\/coming-in-2023\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"CHRISTMAS 2022","article_description":"Check out what I got this year.","article_author":"David Hunter","article_date":"2022-12-27","article_time":"14:30","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/12\/27\/christmas-2022\/"},"fileContents":"\n<p>Hey all, I hope you are having a good festive period surrounded by those that matter to you, and that you are all warm and healthy.<\/p>\n\n<p>This year, I got a range of gifts, some from myself, and some from others. These are detailed below.<\/p>\n\n<h3>Gifts from Myself<\/h3>\n\n<ul>\n    <li>Samsung DVD Recorder & VCR DVD-VR325<\/li>\n    <li>Technics Stereo Cassette Receiver SA-K2L<\/li>\n    <li>Lenovo ThinkVision T23i-20 23-inch Full HD Computer Monitor<\/li>\n    <li>Electric Cordless Air Duster with 6000mAH Rechargable Battery<\/li>\n    <li>Sony PlayStation Console with Controllers and Cables<\/li>\n    <li>Grand Theft Auto game for PlayStation<\/li>\n    <li>GTA2 game for PlayStation<\/li>\n    <li>Grand Theft Auto London: Mission Pack #1: London 1969 game expansion for PlayStation<\/li>\n    <li>Driver game for PlayStation<\/li>\n    <li>Driver 2 game for PlayStation<\/li>\n    <li>TCA World Touring Cars game for PlayStation<\/li>\n    <li>PlayStation Storage Bag<\/li>\n    <li>Sony PlayStation 2 Console with Controller and Cables<\/li>\n    <li>Grand Theft Auto III game for PlayStation 2<\/li>\n    <li>Grand Theft Auto Vice City game for PlayStation 2<\/li>\n    <li>Grand Theft Auto San Andreas game for PlayStation 2<\/li>\n    <li>Grand Theft Auto Liberty City Stories game for PlayStation 2<\/li>\n    <li>Grand Theft Auto Vice City Stories game for PlayStation 2<\/li>\n    <li>Harry Potter: Quiddich World Cup game for PlayStation 2<\/li>\n    <li>Red Dead Revolver game for PlayStation 2<\/li>\n    <li>Sony PlayStation 2 Remote Control<\/li>\n    <li>Sony DualShock 2 Controller for PlayStation 2<\/li>\n    <li>Sony PlayStation 2 Memory Card 8 MB<\/li>\n    <li>Sony PlayStation 2 Memory Card 128 MB [x3]<\/li>\n    <li>Grand Theft Auto game for Nintendo GameBoy Color<\/li>\n    <li>Selena Gomez: Rare album on Compact Cassette<\/li>\n    <li>Now 100 Hits 80s No.1s album download on Apple Music<\/li>\n    <li>Giant Cola Bottles Sweets<\/li>\n<\/ul>\n\n<h4>Extra Thoughts<\/h4>\n\n<p>When cleaning around my bedroom recently, I found some old video tapes I've had for many years, and kept meaning to watch again before deciding what to do with them, so I purchased a new video player that can also play DVDs. It also has the ability to copy videos to DVD so if I wish to backup any of these video tapes to DVD I can do so.<\/p>\n\n<p>At some point, either earlier in the year or the previous year, I purchased a cheap cassette tape player that didn't sound too good. It was good enough to check out what was on some old tapes I had, but after using it I kinda liked the format. It took me back to when I was a kid and was growing up with the format, so wanted to properly try it out and actually use it to listen to music on a more permanent basis, so I purchased a Cassette Receiver so I could make it part of a HiFi setup. It works really well, much better than that cheap thing I got previously, and actually (to me) sounds amazing. So glad I made this purchase.<\/p>\n\n<p>I needed a new computer monitor, the one I was using (an old TV) was starting to break down and act strange, so I purchased a cheaper second hand one and it didn't work upon arrival, so purchased the Lenovo ThinkVision monitor brand new and it works really well. The smaller and also raised monitor has also opened up more space on my computer desk and has allowed me to organise things better than have the very cramped space my old TV created. Happy with this purhcase.<\/p>\n\n<p>I also wanted to make a commitment to keeping my bedroom in better condition than I have been, and got tired of using the consumable air duster cans I had been using up until now, so I purchased a rechargable air duster to help remove dust from areas that are harder to get to, and also hopefully make future cleaning tasks more efficiant and motivate me to clean more often. It works really well and I am happy with this purchase.<\/p>\n\n<p>The two PlayStation consoles (PS1 and PS2) were both purchased second hand, and work really well. I regretted selling my PS2 previously, so wanted to buy it again, and even though it can play PS1 games, I wanted to properly experience playing games on an actual PS1, the one that started all the PlayStations we know and love today, so I purchased one and love it.<\/p>\n\n<p>The TCA World Touring Cars game for PlayStation (PS1) is a free game I got with the console, and is surprisingly better than I thought. It doesn't have a case, and came directly in the console itself. I can easily supply a case for it.<\/p>\n\n<p>Sadly, both controllers for the PlayStation 2 did not work upon arrival, however one of the ones I got with the PS1 did work so I am using that with both consoles.<\/p>\n\n<p>Selena Gomez Rare on Compact Cassette will go nicely with the same album I have on Vinyl Record and Compact Disc (CD). I got it mainly so I could test out my Cassette Receiver. I had other tapes I could have used, but wanted to use the same album I used when testing out the Record Player previously. That's why I went with Selena Gomez Rare.<\/p>\n\n<p>Those that know me know that I normally buy my music on Amazon Music, and this hasn't changed. I was trying out one of the older GTA games on my iPad, and it has a radio station called Tape Deck that plays music from your Apple Music, so needed a quick album to play on it that fits with the game and also one I would happily play again, so I opted for Now 100 Hits 80s No.1s.<\/p>\n\n<h3>Gifts from Others<\/h3>\n\n<ul>\n    <li>PlayStation String Lights from Family<\/li>\n    <li>Clip On Smartphone Holder from Family<\/li>\n    <li>Private Eye Annual 2022 from Family<\/li>\n    <li>White Chocolate Smarties from Family<\/li>\n    <li>(Tiny) Tony's Chocolonely Chocolates from Family<\/li>\n    <li>Money from Family<\/li>\n    <li>USB Mini Vacuum from Family<\/li>\n    <li>Minecraft Creeper Hot Chocolate Mug Set from McG Relatives<\/li>\n    <li>Dark Gray and Black Superman T-Shirt from McG Relatives<\/li>\n    <li>Cadbury Heros Chocolates and Money from Neighbour<\/li>\n    <li>Sports Direct Gift Card from B Relatives<\/li>\n<\/ul>\n\n<h4>Extra Throughts<\/h4>\n\n<p>I had been thinking of adding more lighting effects to my bedroom, and I must have mentioned it to my family at some point, because they got me a set of string lights in the style of PlayStation buttons, which fits in nicely with my love for PlayStation. (For Xbox fans, I also own an Xbox One console, but this christmas was more PlayStation focused. :P)<\/p>\n\n<p>The USB Mini Vacuum was probably a message from my mother to do more regular cleaning, and I intend to do so with the help of this gift.<\/p>\n\n<p>As for the Minecraft Creeper Hot Chocolate Mug Set, the mug is HUGE and makes my normally large coffee (Kenco Americano Grande) rather small, and only fills like half the mug, but I enjoy it all the same. A little bit of a different experience drinking out of it, because it is a square mug, and has to be since its Minecraft, but its all part of the fun. Thank you to my McG relatives for this amazing gift.<\/p>\n\n<h3>Conclusion<\/h3>\n\n<p>The most important thing to me about this Christmas, was not the gifts I got myself or received from others, but rather having my family and relatives around me and able to spend time with all of them. Today is our planned annual family get together. This is what makes Christmas so magical.<\/p>\n\n<p>Take care everyone, and thank you for stopping by and reading this blog article.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">CHRISTMAS 2022<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-12-27 at 14:30.<\/p>\n        <p class=\"description\">Check out what I got this year.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/12\/27\/christmas-2022\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Love Calculator: Updated Result and the No JavaScript message","article_description":"A small but still important update.","article_author":"David Hunter","article_date":"2022-10-24","article_time":"01:14","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/24\/love-calculator-updated-result-and-the-no-javascript-message\/"},"fileContents":"\n<h2>The result is now rounded to the nearest whole number.<\/h2>\n\n<p>Some results came out with a decimal place precision, and although sometimes it looked okay, there were some results that came out with a rediculous precision, so I had to do something.<\/p>\n\n<p>I started off by fixing the result to two decimal places, but that made the whole numbers also have the two decimal place precision, and that made it feel less like a game.<\/p>\n\n<p>To make it feel more like a game again, I made the decision to round all results to the nearest whole number.<\/p>\n\n<p>Basically, this means you will always see results like 23% instead of 22.33%.<\/p>\n\n\n<h2>Fixed the No JavaScript message not appearing in some cases, and improved its visibility<\/h2>\n\n<p>Before this update, I was using the HTML tag called \"noscript\", which is an old tag not added to some mobile browsers, specifically Brave on iOS is where I saw it, but it may also have affected others.<\/p>\n\n<p>To fix this, I needed a more modern approach that I knew would have a much higher chance of being supported in all browsers in use today.<\/p>\n\n<p>I changed the noscript tag to a div tag and applied some styles to it to make it more visible. Then JavaScript is used to make that div disappear, meaning the message will still show for those with JavaScript disabled, but will hide for those with it enabled.<\/p>\n\n<p>After making the update live, I went to Brave on iOS to verify it worked as expected, and it did.<\/p>\n\n\n<h2>Conclusion<\/h2>\n\n<p>This was a relatively small update, but still important. Let me know your feedback.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Love Calculator: Updated Result and the No JavaScript message<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-24 at 01:14.<\/p>\n        <p class=\"description\">A small but still important update.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/24\/love-calculator-updated-result-and-the-no-javascript-message\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Recent Updates to DAH5","article_description":"Check out these updates I have made to the DAH5 website.","article_author":"David Hunter","article_date":"2022-10-23","article_time":"01:30","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/23\/recent-updates-to-dah5\/"},"fileContents":"\n<p>I have been working hard on new updates to the DAH5 website, also known as my oldest and longest standing website, originally lauched back in April 2005.<\/p>\n\n<h2>Updates<\/h2>\n\n<ul>\n    <li><a href=\"#added-light-and-dark-color-modes\">Added Light and Dark Color Modes<\/a><\/li>\n    <li><a href=\"#added-color-mode-toggler\">Added Color Mode Toggler<\/a><\/li>\n    <li><a href=\"#added-reference-section\">Added Reference Section<\/a><\/li>\n    <li><a href=\"#added-games-section-with-love-calculator-game\">Added Games Section with Love Calculator game<\/a><\/li>\n    <li><a href=\"#added-contact-details-to-the-about-page\">Added Contact Details to the About page<\/a><\/li>\n    <li><a href=\"#radically-changed-the-site-structure-to-make-future-developments-easier\">Radically Changed The Site Structure To Make Future Developments Easier<\/a><\/li>\n<\/ul>\n\n<a name=\"added-light-and-dark-color-modes\"><\/a>\n<h3>Added Light and Dark Color Modes<\/h3>\n\n<p>The site will use your color mode preference as set in your device settings, and change aspects of the site accordingly.<\/p>\n\n<p>Usually this means you will start in Light Mode because a lot of people probably won't change this setting, and Light Mode is usually the default, but for those who prefer things looking darker, your preference will now be taken into account while using the site.<\/p>\n\n<p>Feel free to change your device color mode setting and see how the site adapts to this. You could find you prefer the opposite mode to what you currently have, either all the time, or at certain times, such as light mode during the day, and dark mode during the night.<\/p>\n\n\n<a name=\"added-color-mode-toggler\"><\/a>\n<h3>Added Color Mode Toggler<\/h3>\n\n<p>Choosing between light mode and dark mode for your device is one thing, but what if you prefer your device in dark mode, but prefer the site in light mode?<\/p>\n\n<p>Now you can have the best of both worlds. Set your device color mode setting to one and use the toggler to view the site in the opposite mode, or simply try the site in the opposite mode before you actually change the setting.<\/p>\n\n<p>Find the toggler in the footer section on any page across the site. Note, the color scheme will revert back to device preference upon page reload.<\/p>\n\n\n<a name=\"added-reference-section\"><\/a>\n<h3>Added Reference Section<\/h3>\n\n<p>The brand new reference section will contain information to refer back to on a variety of subjects. Mostly created as a section to contain notes of things I learn when I learn them, I probably will update it with things I feel could be useful to others when the ideas come to me.<\/p>\n\n<p>Check it out at <a href=\"https:\/\/www.dah5.com\/reference\" target=\"_blank\">dah5.com\/reference<\/a>.<\/p>\n\n\n<a name=\"added-games-section-with-love-calculator-game\"><\/a>\n<h3>Added Games Section with Love Calculator game.<\/h3>\n\n<p>Back when I was in school, I added a game called Love Calculator I found online, that I showed off to others when I had the chance. It was really popular. I saw classmates playing the game even when I didn't prompt them to, which shows it was a great success.<\/p>\n\n<p>Over the years, I changed to creating my own game, and even had times when I took the game offline when I didn't think anyone was playing it anymore.<\/p>\n\n<p>Recently, I have decided to recreate this game from how I remember it working, and make it available online again.<\/p>\n\n<p>In the future, I hope to make more games, even if they are really simple, just for a bit of fun, which is why I have created a games section to save me moving things around later.<\/p>\n\n<p>Check out my games section, including the new Love Calculator game, at <a href=\"https:\/\/www.dah5.com\/games\" target=\"_blank\">dah5.com\/games<\/a>.<\/p>\n\n\n<a name=\"added-contact-details-to-the-about-page\"><\/a>\n<h3>Added Contact Details to the About page<\/h3>\n\n<p>You can now get in touch with your feedback using the details on the site's about page.<\/p>\n\n<p><a href=\"https:\/\/www.dah5.com\/about\">dah5.com\/about<\/a><\/p>\n\n\n<a name=\"radically-changed-the-site-structure-to-make-future-developments-easier\"><\/a>\n<h3>Radically Changed The Site Structure To Make Future Developments Easier<\/h3>\n\n<p>This is a technical update that mostly only affects things during development to make things easier for me, and anyone else I may have as contributors in the future.<\/p>\n\n<p>Keeping things non-technical, I basically moved parts of how the site is structured into their own dedicated files, which effectively cleans up the code and makes it easier to manage.<\/p>\n\n\n<h2>Conclusion<\/h2>\n\n<p>Thank you for checking out this update article, and that going forward I hope there will be plenty more updates to see.<\/p>\n\n<p>Until next time, take care.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Recent Updates to DAH5<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-23 at 01:30.<\/p>\n        <p class=\"description\">Check out these updates I have made to the DAH5 website.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/23\/recent-updates-to-dah5\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Introducing DAH5 Games","article_description":"My brand new games website is now live!","article_author":"David Hunter","article_date":"2022-10-20","article_time":"01:00","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/20\/introducing-dah5-games\/"},"fileContents":"\n<p>My brand new games website is now live!<\/p>\n\n<p>For many many years, I have on and off had a game on my website that was popular when I was in school. Today, I am very proud to announce its relaunch.<\/p>\n\n<h2>Love Calculator<\/h2>\n\n<p>My longest standing, and most popular game from back when I was in school and beyond allows you to put in your name and the name of someone else, and it will calculate how much you could be in love with each other.<\/p>\n\n<p>After that, you can click a button to easily swap the names around to see how much they could be in love with you.<\/p>\n\n<p>Of course, it is just a game and a bit of fun, so the results are not to be taken seriously, however, it could help you decide which path to take, or just waste some time when you are bored.<\/p>\n\n<h3>Play Love Calculator<\/h3>\n\n<p>So you want to play Love Calculator?<\/p>\n\n<p>Head on over to the <a href=\"https:\/\/www.dah5.com\/games\" target=\"_blank\">DAH5 Games<\/a> website at <a href=\"https:\/\/www.dah5.com\/games\" target=\"_blank\">dah5.com\/games<\/a>.<\/p>\n\n<h2>Other Games<\/h2>\n\n<p>The above mentioned Love Calculator game, at the time of writing, is currently the only game available to play, however, I do plan to come up with some more small simple games, and maybe even some bigger fancier games.<\/p>\n\n<p>Keep an eye on my blog so you know when I launch new games or update my current ones.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Introducing DAH5 Games<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-20 at 01:00.<\/p>\n        <p class=\"description\">My brand new games website is now live!<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/20\/introducing-dah5-games\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Light Versus Dark Color Modes","article_description":"Learn the big deal between light versus dark color modes, and why you might want to care about it.","article_author":"David Hunter","article_date":"2022-10-18","article_time":"18:05","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/18\/light-versus-dark-color-modes\/"},"fileContents":"\n<p>Basicly, it is a personal preference of whether you want to see more white and colors closer to white, or more black and colors closer to black.<\/p>\n\n<p>It doesn't matter as much for physical objects, but you may have a preference for those too, it matters more for digital devices with some kind of display.<\/p>\n\n<h2>Why should you care whether you are in light mode or dark mode?<\/h2>\n\n<p>Good question. As it is personal preference, everyone will be different as to which one they prefer, but if you haven't made up your mind yet, here are some things to think about.<\/p>\n\n<h3>The time of day and brightness of your environment may matter.<\/h3>\n\n<p>During the day, or while in brighter environments, you may wish to use light mode, as it would fit in more with the surroundings.<\/p>\n\n<p>At night, or while in darker environments, you may wish to use dark mode, as it would not cause your device or screen to shine so brightly and light up the room.<\/p>\n\n<h3>Dark mode may be easier on the eyes.<\/h3>\n\n<p>Your eyes adjust to the brightness of the colors on the screen. Going from brighter surroundings to a darker screen is easy, however, the opposite, going from a dark environment to a brighter screen is harder and can more easily cause strain on your eyes.<\/p>\n\n<p>Have you ever tried to check the time on your phone in the middle of the night as you turn over in your bed? Your bedroom would most likely be really dark with very little light, and the bright white screen of your phone may be hard to read.<\/p>\n\n<p>Brighter colors have been known to keep you awake for longer, or interfere with your body's natural winding down to sleep, which can cause you to get less sleep during the night, and possibly make you wake up later the following day, that has its own problems. Dark mode allows your body to continue winding down at night and hopefully sleep well.<\/p>\n\n<h3>Dark mode may use less power.<\/h3>\n\n<p>This is especially important for your phones and tablets, but applies to all devices. Using less energy to power your devices has many benefits.<\/p>\n\n<ul>\n    <li>It may cost less for the same amount of usage over light mode.<\/li>\n    <li>Battery powered devices may last longer before needing a recharge or replacement of batteries.<\/li>\n    <li>More devices could potentially be powered at the same time for the same cost over using light mode.<\/li>\n<\/ul>\n\n<h2>Conclusion<\/h2>\n\n<p>Use this article to help guide you to making your own personal decision. It would be impossible for me to tell you which one is best for you, as it would depend on other factors that form part of your life, I can only guide you in the hopes the decision you make is right for you.<\/p>\n\n<p>Try changing your device's display settings, and switch it to the opposite mode to what you have now, then return to this article. It will change automatically depending on your preference, giving you a real example of how other things could be affected by your preference.<\/p>\n\n<p>Feel free to get in touch to let me know your thoughts. Thank you so much for reading.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Light Versus Dark Color Modes<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-18 at 18:05.<\/p>\n        <p class=\"description\">Learn the big deal between light versus dark color modes, and why you might want to care about it.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/18\/light-versus-dark-color-modes\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Movie: Snow White and the Huntsman (2012)","article_description":"Just watched a movie called Snow White and the Huntsman released a decade ago.","article_author":"David Hunter","article_date":"2022-10-15","article_time":"02:42","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/15\/snow-white-and-the-huntsman-2012\/"},"fileContents":"\n<p>Oh wow, what an amazing movie!<\/p>\n\n<p>I got pulled in at every moment of action. Normally, I don't like action that much, but with Kristen Stweart as Snow White, I was transfixed at how well she suited the role.<\/p>\n\n<p>Literally, I forgot how the story goes, and I legit felt like Snow White died, especially when she was kissed and that did absolutely nothing. I shed a tear.<\/p>\n\n<p>I won't say much more other than you should totally watch this movie!<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Movie: Snow White and the Huntsman (2012)<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-15 at 02:42.<\/p>\n        <p class=\"description\">Just watched a movie called Snow White and the Huntsman released a decade ago.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/15\/snow-white-and-the-huntsman-2012\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "},{"metadata":{"article_title":"Hello World","article_description":"This is my first blog entry.","article_author":"David Hunter","article_date":"2022-10-15","article_time":"00:52","layout":"src\/_inc\/base.php","current_page":"blog","uri":"\/blog\/2022\/10\/15\/hello-world\/"},"fileContents":"\n<p>This is my first blog entry. It's such an exciting thing to start a new blog.<\/p>\n\n<p>I may not update it that often, but hopefully it will still contain good content when I do.<\/p>\n\n<p>Thank you for stopping by.<\/p>\n","outputContent":"\n    <article>\n        <h3 class=\"title\">Hello World<\/h3>\n        <p class=\"metadata\">Published by David Hunter on 2022-10-15 at 00:52.<\/p>\n        <p class=\"description\">This is my first blog entry.<\/p>\n        <p class=\"buttons\">\n            <a href=\"\/blog\/2022\/10\/15\/hello-world\/\">Read More<\/a>\n        <\/p>\n    <\/article>\n    "}]