1
0
Fork 0

Merge branch 'master' of ssh://code.nolog.cz:223/ejv2/ejv2.cc

This commit is contained in:
Ethan Marshall 2024-09-12 23:50:19 +01:00
commit 7f4ce6ab1a
Signed by: ejv2
GPG key ID: EC2FAEF4DB8968D8
9 changed files with 87 additions and 23 deletions

View file

@ -4,7 +4,7 @@ Hi! I am Ethan Marshall (also known as ``ejv2``) and you have reached my corner
{{< figure src="/img/me-yorkshire.jpg" caption="Me - totally not drunk in a flatcap" >}}
I spend most of my time writing software and building circuits, although more the latter nowadays. I quite like working with embedded micro-controllers (ESP32, Atmel, 3286) and FPGAs (Xilinx and Gowin) - and I have some experience in PCB design.
I spend most of my time writing software and building circuits, although more the latter nowadays. I quite like working with embedded micro-controllers (ESP32, Atmel, 6502) and FPGAs (Xilinx and Gowin) - and I have some experience in PCB design.
Other than that, I like spending time with my dog.

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -0,0 +1,61 @@
+++
title = 'Blog Migration'
date = 2024-09-10T13:58:17+01:00
author = 'Ethan Marshall'
+++
Like all great, wild animals, the humble webblog must occasionally embark upon the mighty journey of a migration.
{{< figure src="migration.jpg" caption="Footage of me migrating the blog" >}}
The migration of my old site to this one is (pretty much) complete!
Old, migrated content is now available on the [old posts page](/blog/old/).
The process was surprisingly painless, actually. Knowing WordPress, I thought that it would take hours - most of which would be waiting for scripts to finish running - and would be very tedious. To my utter shock, the process took barely a single hour - most of which was me fussing over image sizes. In any case, I thought it would make a nice first blog post to talk about my process of migrating the site over.
## Migrating Posts
Migrating posts was the easiest part of all. Built in to WordPress, there is an archiving feature which permits all the site's downloads to be archived locally in a [WordPress XML Archive](https://developer.wordpress.org/advanced-administration/wordpress/import/) format. This format could then be loaded back up by another blog, should you wish to move all the content between two WordPress installs. This format contains all posts, pages, images and settings - as well as references to the installed plugins on the WordPress workshop (I can't remember what it's actually called so let's call it the workshop anyway).
{{< figure src="gmod.jpg" caption="This is your brain on Garry's Mod" >}}
Anyway, I was already breaking out awk and perl to try extracting posts when I found [this project](https://github.com/lonekorean/wordpress-export-to-markdown) on GitHub which saved me a couple of hours. After a surprisingly short download time waiting for npm to finish (only eleven whole dependencies! wow!), I ran the tool and pretty much everything fell into place. Nice one!
### Broken Images
I began testing the markdown files locally using the ```hugo server``` command as per usual. The issue was that I was pretty sure that the markdown generator was inserting hard links to media stored on the old domain. Given that I planned on eventually taking the old site down, I couldn't have all the old content randomly breaking.
Sure enough, loading the markdown files with the old server off lead to all the images breaking.
I wrote a quick script that extracted each link and rewrote it to the local path that the tool had already created in the directory. Helpfully, the filenames remained the same - only the path had changed.
### Resizing Images
The next image-based problem was that WordPress seemed to be using CSS to resize images on the fly. So, I wrote a quick shell script that looped through each image file it found in the content directory and used imagemagick to resize them to a smaller bounding box. I placed a hard limit on the width that images could be to aid in the flow of the site, but the height remained unbounded to preserve the aspect ratio.
### Double Checking
Before I wrapped everything up and called it a day, I went through each post individually just to double check. There were a couple of images where I couldn't figure out a good way to resize them without it looking ridiculous, so I cropped them down a bit.
And with that, the old posts were migrated across!
## Old site redirect
For the moment, the old site will remain up but with an HTTP redirect in place to send people to the new location. I set this to a permanent redirect from the root and nowhere else. The idea behind that was that people would get sent to old links, get a 404 and try going to the root. This isn't the best method and I would like to set up redirects for everything, but I think this is the most convenient way for a small-scale blog to migrate. Sorry to anybody with broken links!
## Email
I am yet to migrate email properly, which means I am currently operating between split mailboxes. That's a bit annoying, but apparently there is a method to forward mail from one domain to another using MX records. The only thing I worry about is that it might get complicated with how DMARC and email keys work. To be honest, I just used a script to set up my current email signing stuff.
One annoying detail to add on to this is that my email infrastructure is a bit less flexible than I thought because my hosting provider refuses to provide reverse DNS (PTR records) for IPv6 addresses. I "fixed" this by just setting the address family that Dovecot is allowed to use to just Inet4. This fixes outgoing mail being rejected by GMail, among others.
## Summary
So, in summary:
- WordPress is pretty easy to migrate to markdown
- You **should** migrate your WordPress site to markdown
- The site is pretty much migrated
Cheers and see you in the next one!

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -9,7 +9,7 @@ Recently, I was made aware of the following cartoon comic strip created by a Twi
<figure>
[![](images/ALM_retort.jpeg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/ALM_retort.jpeg)
![](images/ALM_retort.jpeg)
<figcaption>
@ -23,9 +23,9 @@ Now, from inspecting this account a little further, it is pretty clear where the
<figure>
- [![](images/Wants-to-brainwash-kids.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/Wants-to-brainwash-kids.png)
- [![](images/Says-woke-is-positive-change.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/Says-woke-is-positive-change.png)
- [![](images/Complaining-about-appropriation.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/Complaining-about-appropriation.png)
- ![](images/Wants-to-brainwash-kids.png)
- ![](images/Says-woke-is-positive-change.png)
- ![](images/Complaining-about-appropriation.png)
<figcaption>
@ -45,9 +45,9 @@ Don't believe me? Well, BLM encourages the lie that whites have inherent privile
So, I think it's safe to say that BLM is harming the lives and livelihoods of other races in its supposed "effort" to improve the lives of black Americans. And so, when the author says:
[![](images/forests-panel-1.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/forests-panel-1.png)
![](images/forests-panel-1.png)
[![](images/forests-panel-2.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/forests-panel-2.png)
![](images/forests-panel-2.png)
Their argument is flawed in that my response _totally would_ be to say "All forests matter" to a protester to save the rain forest if their solution to cutting down the rainforest is to burn down all other forests on earth - which is comparable to what BLM is doing but with race divisions. Another example: I would respond "actually, all oceans matter" if somebody's solution to the Atlantic Ocean's sea level rising was to dump all the water into the black sea and flood several countries. The author trips himself up in his original post when he says that it "doesn't mean that we think the other forests have no value" - which, ironically, is how the BLM organisation treats the livelihood and relations to other races: worthless. The point being that a major part of the conservative backlash towards BLM as an organisation is their attitude towards other races and their seeming inability to actually follow through in their promise that they simply want all lives to matter equally. If BLM wants my confidence back that they are a simple, honest organisation focused on equality, they should start by publicly opposing affirmative action in all forms and remove the sections from their manifesto which state that whites should be "[giving up property for black families](https://nypost.com/2020/08/14/seattle-blm-protesters-demand-white-people-give-up-their-homes/)". Until they make these fundamental changes to the things that their organisation believes in, you are going to keep hearing this retort to your protesting - so I'd get it done sooner rather than later, if I were you.
@ -68,7 +68,7 @@ So, let's sum up. The author of this comic strip's argument is not only fundamen
<figure>
[![](images/supposed-personal-growth.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/02/supposed-personal-growth.png)
![](images/supposed-personal-growth.png)
<figcaption>

View file

@ -15,7 +15,7 @@ First and foremost, it is important to consider wider political state in the cur
<figure>
[![](images/justice.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/justice.png)
![](images/justice.png)
<figcaption>
@ -27,7 +27,7 @@ Notice the conflation of "climate" and "social" justice
<figure>
[![](images/communism-1024x576.jpg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/communism.jpg)
![](images/communism.jpg)
<figcaption>
@ -39,7 +39,7 @@ Notice the pride and USSR flags
<figure>
[![](images/conflation.jpg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/conflation.jpg)
![](images/conflation.jpg)
<figcaption>
@ -51,7 +51,7 @@ More conflation of goals and clear influences
<figure>
[![](images/biases.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/biases.png)
![](images/biases.png)
<figcaption>
@ -63,7 +63,7 @@ Try to spot how many political affiliations there are. Notable mentions "Sociali
<figure>
[![](images/socialist-child-1024x551.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/socialist-child.png)
![](images/socialist-child.png)
<figcaption>
@ -75,7 +75,7 @@ A **CHILD** wielding a sign from the Socialist Workers' Party which reads "The S
<figure>
[![](images/socialism-1.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/socialism-1.png)
![](images/socialism-1.png)
<figcaption>
@ -87,7 +87,7 @@ A substantial block of protesters claim to "decolonize the planet" and to "rally
<figure>
[![](images/societs.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/11/societs.png)
![](images/societs.png)
<figcaption>

View file

@ -11,7 +11,7 @@ You see, Leyendecker's art is based around bold, blocky colors which are used to
<figure>
[![](images/leyendecker-1-1024x718.jpg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/09/leyendecker-1.jpg)
![](images/leyendecker-1.jpg)
<figcaption>
@ -27,7 +27,7 @@ One of the best places where this can be seen is in the art style of Team Fortre
<figure>
[![](images/tf2-contrast.jpeg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/09/tf2-contrast.jpeg)
![](images/tf2-contrast.jpeg)
<figcaption>
@ -39,9 +39,9 @@ Screenshot from Team Fortress 2 - taken 12/06/2015
In this image, a few things are very apparent. Firstly, the player in the center of the screen is very visually distinct: you can't miss him. The soldier stands out from the background very easily, despite using the exact same color pallete and using complementing colors. Why is this? The answer is _saturation._ TF2 ensures that players will always have a much higher level of color saturation to that of the background, meaning that it is really difficult to miss where he is standing. Secondly, you can see exactly whose base you are in. TF2 uses contrasting color palletes to ensure that you can always tell where you are in a level at any time. Observe these two images:
[![](images/tf2-blue.jpeg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/09/tf2-blue.jpeg)
![](images/tf2-blue.jpeg)
[![](images/tf2-red.jpeg)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2021/09/tf2-red.jpeg)
![](images/tf2-red.jpeg)
Which team do you think occupies each part of the map? To even the minimum of pertinent observers, it is fairly obvious that the left base is occupied by blue, whereas the right goes to red. This is entirely down to Leyendecker's genius of contrast: everything was based on color. Whereas a lot of art uses other techniques to contrast things (such as positive and negative space), Leyendecker could place two different objects right next to each other (maybe even inside each other) and still have the eye naturally contrast them.

View file

@ -7,7 +7,7 @@ categories:
I have been dealing with spam on my public email address for quite some time now, and it finally got to the peak of my patience with the the following email, sent to my email not so long ago:
[![](images/hillarious-email-1024x563.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2022/03/hillarious-email.png)
![hillarious spam #1](images/hillarious-email.png)
I mean, not the most convincing fake in the world, but it did give me a good laugh. And, for quite a long time, I was perfectly willing to leave my public email out there so that these hillarious messages of spam could get through to me, as I don't use any filter other than explicitly banned addresses. Among other very funny spam messages, here are the two runner ups of best spam emails:
@ -15,7 +15,7 @@ I mean, not the most convincing fake in the world, but it did give me a good lau
<figure>
[![](images/more-spam-1019x1024.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2022/03/more-spam.png)
![](images/more-spam.png)
<figcaption>
@ -27,7 +27,7 @@ Great email from a Spanish prince this time?
<figure>
[![](images/Hillarious-Spam.png)](https://www.ethanjmarshall.co.uk/wp-content/uploads/2022/03/Hillarious-Spam.png)
![](images/Hillarious-Spam.png)
<figcaption>

View file

@ -1,10 +1,13 @@
+++
title = 'Site Credits'
draft = false
+++
This site was started by Ethan Marshall on the Tuesday 16th of July 2024 after retiring his original site created winter of 2012.
This site is powered by [hugo](https://gohugo.io) with a modified version of the [risotto](https://github.com/joeroe/risotto) theme.
Thanks to [Luke Smith](https://lukesmith.xyz) for some ideas, as well as all the contributors to <https://landchad.net>.
The full sources (and modified theme) are available on [source control](https://code.nolog.cz/ejv2/ejv2.cc).
I am happy to accept Git patches for the site through [git-send-email](https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_project_over_email). I'll add your name to the credits file if you send something :)