From 4ace83da3951c37f18fbb9676542239be4d051ee Mon Sep 17 00:00:00 2001 From: Hannah Isopod Date: Fri, 13 Jun 2025 01:13:52 -0600 Subject: various minor changes + blog post a bunch of minor alterations, of particular import is the new blog post and the IP banning function I added to the guestbook --- blog/posts/blog_questions/index.md | 55 ++++++++++++++++++++++ blog/posts/blog_questions/index.php | 1 + blog/posts/how_my_blog_works/index.md | 0 blog/posts/how_my_blog_works/index.php | 1 - blog/posts/post.php | 5 +- blog/posts/renting_an_unremarkable_server/index.md | 16 +++---- 6 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 blog/posts/blog_questions/index.md create mode 100644 blog/posts/blog_questions/index.php delete mode 100644 blog/posts/how_my_blog_works/index.md delete mode 100644 blog/posts/how_my_blog_works/index.php (limited to 'blog/posts') diff --git a/blog/posts/blog_questions/index.md b/blog/posts/blog_questions/index.md new file mode 100644 index 0000000..4f6ac6b --- /dev/null +++ b/blog/posts/blog_questions/index.md @@ -0,0 +1,55 @@ +I was clicking around [some other blog](https://blog.kalechips.net/post/2025-01-11-Blog-Questions) and found this fun little list of question prompts for foolish, naive bloggers such as myself to answer publicly, thus casually exposing our secrets and opening ourselves up to blackmail and doxxing. Naturally I decided it would be cool to do it myself. + +Apparently someone's supposed to tag you in these things, but it's my blog and it's not like anyone's gonna stop me, so I'm doing it totally unsolicited, and if you don't like it you can pound sand, suck a lemon, and other such whimsical idioms. + +Conveniently, this also serves the purpose of the obligatory "how my CMS works" post I've been meaning to write for the past couple months. + +## Why did you start blogging in the first place? + +Like many of the things on my website, I initially started a real-ass proper we-blog because it seemed like a cool thing to put on my website, and it was a good place to put a style of writing that didn't really feel suited to the various microblogging platforms I already had a presence on. I kept doing it because, as it turns out, I sometimes have a lot to say about something. Most often computer toucher shit. + +## What platform are you using to manage your blog and why did you choose it? + +To call the thing I've built here a "platform" would be a little generous, I think, but it is pretty interesting, and possibly quite unorthodox. + +The backend for my blog is built around its RSS feed, which is to say, the authoritative source for all the metadata for each blog post is an Atom feed that I write by hand. The PHP script that renders the index page is essentially just a glorified RSS reader for just that one feed. + +The posts themselves are stored as Markdown files with a smattering of HTML mixed in for the really custom stuff, and there's a second PHP file that renders them using a third-party PHP Markdown parser called [Parsedown](https://github.com/erusev/parsedown) (which, fun fact, is also responsible for the Markdown support in the comment section). The only unfortunate thing here is every markdown file has to be accompanied by a stub index.php that just `include`s the main post rendering script, but it's not like I ever have to touch those so it's fine. Here, I'll put all the code that's in every single one right here: + +``` +entry as $entry) { $pdate = preg_replace('/T.*$/', ' ', $entry->published); $udate = preg_replace('/T.*$/', ' ', $entry->updated); $title = $entry->title; - $descr = $entry->summary; + $descr = htmlspecialchars($entry->summary); } else if($title) { $nextlink = $entry->link["href"]; $nexttitle = $entry->title; @@ -73,6 +73,9 @@ foreach($feed->entry as $entry) { flex-direction: column; } } + td { + display: table-cell !important; + } diff --git a/blog/posts/renting_an_unremarkable_server/index.md b/blog/posts/renting_an_unremarkable_server/index.md index d2687dd..117de85 100644 --- a/blog/posts/renting_an_unremarkable_server/index.md +++ b/blog/posts/renting_an_unremarkable_server/index.md @@ -4,14 +4,14 @@ Up until recently, I ran all my exposed-to-the-web self-hosted services on a mod In researching alternative VPS options, I landed on OVH because they were the most reputable non-American hosting provider I could find with a datacenter in my country that I could be sure would allow me to use IPv6. Their VPS offerings were decent, certainly attractive to someone used to DigitalOcean prices, but I ended up going with a dedicated server instead due to the, to put it lightly, *vastly* better price-to-performance ratio on offer: -| | Old VPS | New server | Comparably priced OVH VPS | -| --- | --- | --- | --- | -| CPU | 2 threads | 4 core/8 thread Intel Xeon-D 1520 | 4 threads | -| RAM | 4GB | 32GB DDR4-2133 ECC | 4GB | -| Storage | 80GB NVMe | 480GB mirrored SATA SSDs | 80GB NVMe | -| Network | 2Gbps | 300Mbps | 1Gbps | -| Backups | Automated | Bring your own | On-demand | -| Price (CAD) | $44/mo | $25/mo | $26/mo | +| Old VPS | New server | Comparably priced OVH VPS | +| --- | --- | --- | +| 2 threads | 4 core/8 thread Intel Xeon-D 1520 | 4 threads | +| 4GB RAM | 32GB DDR4-2133 ECC | 4GB RAM | +| 80GB NVMe | 480GB mirrored SATA SSDs | 80GB NVMe | +| 2Gbps | 300Mbps | 1Gbps | +| Automated backups | Bring your own backups | On-demand backups | +| $44/mo | $25/mo | $26/mo | See what I mean? Of course, none of these seem like all that from the perspective of a modern personal computer, but this represents a *quadrupling* of CPU cores and RAM and a *sextupling* of storage space for a near halving of the price compared to my already adequate previous solution. That's like eight times the value! Though, looking at this table, you can already see a couple of the reasons it's priced so competitively, even accounting for the DigitalOcean tax. Let's break this down. -- cgit v1.2.3