Okay, now I've fixed the SSL cert renewal. Hopefully 😬
I had accidentally reverted my nginx configuration file to an old version, and it had remnants of my old SSL cert. This was causing the file to be invalid.
Anyway, it should be fixed now and it should renew automatically in the future 🤞
Back when I was coloring ascii art by hand, I hit this weird bug that happened when I turned my phone sideways. Well, it's been a while since I turned my phone sideways and I did it again, and noticed more weirdness. I had a few ascii art images that were slightly off on the first row, which didn't seem too bad, but then I saw this monstrosity.
Then I asked my sister to look at the pages on her phone (flipped) and...they looked perfectly fine. Hmm. I guess if my site is only-broken-on-my-device that's better than only-guaranteed-to-work-on-my-device.
Anyway, I analyzed the code, and I realized that this was an issue:
<span class="gray"> </span><span class="lightgold">,*
No, it's not the fact that that second <span> isn't closed. I did that on the next line. It's the first <span> that has nothing but whitespace in it. I don't know, my phone had issues with that. This is just a side effect of how my color-rizer tool works, and maybe I'll fix it one day. Maybe. For now I just modified the html directly. As of now, I've fixed it on the ascii art pages, but not in the individual blog posts. But maybe later.
This is a very long post. So long that I cut off the post unless you look at the individual entry page for this post. I doubt anyone would care to read this, unless someone is interviewing me for a job, and they want to know how I approach problems. So, read it if you want.
So, I have a bunch of pictures on my wordpress site that I need to port over to my Spaces CDN. I've got a script that parses an XML wordpress export, and any time it runs into an image, I need to:
Simple enough. So what I did was take each image, and extract the path out of it. So for this url https://meyzdaisy.files.wordpress.com/2019/01/img_0308.jpg, I'd need the 2019/01/img_0308.jpg part. I have a
bucket that I store all the files in, and each file is accessed using a
key. I created a folder in my bucket just for these images that are coming from my WP site called from-wordpress. And with this, the key for this particular image would be from-wordpress/2019/01/img_0308.jpg
Since coming back from my vacation, I've been trying to limit my exposure to other people. I realized that in my whole life I don't think I've gone two days without interacting with someone else in person. So this is weird. I'm forcing myself to stay at home except for going on runs outside (I need fresh air and exercise), and I don't even do that every day. So far this is working out okay. Each night, I write down a TODO list of things I want to accomplish the next day. I almost never accomplish all the things, but hey, I'm staying busy.
Today I told myself I was going to figure out how to include images in the blog entries occasionally. But then I looked at my site on mobile, and I turned my phone sideways. And you know what I noticed? The little ascii art chick on the front page was all janky looking. But it only happened when I turned my phone sideways. Looked perfectly normal with the phone in the vertical position. I tried to reproduce this in my Chromebook and no matter how I resized the window, it didn't happen. Also, trying to "debug" an issue on a phone is a pain in the butt.
But, somehow I was able to fix it. First I tried Googling, and found some promising looking StackOverflow questions about people having trouble with monospace fonts on mobile, but it turns out those people wanted to use box glyphs and my ascii art is well, ascii. So I zoomed in on the ascii art chick on my phone and highlighted the area. The spaces in front of certain lines were narrower than others. Why? Who the heck knows. I did the same thing on my computer and inspected the space element with the dev tools. I inspected other space elements. And I realized some spaces were inside <span>s and others weren't. So I made it so all the characters in the ascii art section were surrounded by <span>s, and it fixed it!
- <span class="yellow">.--.
+ <pre><span class="yellow">
; </span><span class="lightblue">@</span><span class="yellow">\
- ; :</span><span class="orange">></span>
- <span class="white">/\/\/\/\
+ ; :</span><span class="orange">></span><span class="white">
Yeah, it was kind of dumb. I spent like an hour and a half looking at this. And I never got around to incorporating images in this post. Which would have been helpful. Oh well. Next time.