Month: July 2020

  • Shared today on Twitter

    RT @qkate: Honestly I think some dudes only take this bullshit “no true Scotsman” stance because they’re mad when they see others (mostly w…


    RT @MichelePlayfair: If you’re just starting off with #functionalProgramming, try the Intro to #elixir workshop, those with more experience…


    RT @jeffpatton: Hey Australia & New Zealand!: I’ll be teaching a live online product leadership course in your time zone aug 24-28.

    Look…


  • The Glasgow School Sisters who Influenced Klimt

    I clicked on this blog post expecting to be inspired by Margaret and Frances’s art (which is amazing), but instead came away depressed and angry about the limitations placed on their careers.

    Their marriages, in turn, lead to a dissolving of the sisters’ artistic partnership as Margaret and Frances began collaborative work with their respective partners, as was expected of dutiful wives. During such work much of the sister’s own artistic input was credited to their husbands.

    Rage. 🔥

    via The Glasgow School Sisters who Influenced Klimt | #womensart ♀

  • Shared today on Twitter

    WordPress experts – I am beating my head against the wall. On one site, https://t.co/ChcOEEKcKG redirects to https://t.co/eunndVdO7O. On another, it doesn’t. I can’t figure out why. There’s no redirect_canonical involved that I can find.


    @developerjack Appears to be happening at WordPress level, not Apache. Tried turning off different plugins, doesn’t seem to make a difference.


    @Mikenicholls88 Redirect is happening at WordPress level, somehow.


    @pwcc Yes, just says WordPress. No multisite.


    AH HA. Seems to be related to the fact that one site has a static page set as homepage, and the other has list of latest posts.


    Okay, so here’s the magic: IF you have a static home page set in WordPress, then any subdomain (other than www) that has no path specified (aka https://t.co/mWJcALAUrO) will redirect to your site URL. However, if you ask for https://t.co/Fzd3Ypcxbv, then it will NOT redirect.


    BUT if you have WordPress set to show recent posts (like for a blog), then https://t.co/j2YWBFAntZ will NOT redirect even without a path.


    So what is the point of all this? The point is that I don’t know how CloudFront *isn’t* barfing on https://t.co/tpSG1KvRg5.


    WAIT, WE FIGURED IT OUT. 😅 CloudFront is forwarding the host header when it requests from origin, which is why it’s not getting itself into a circular loop. https://t.co/M5d4jrvZpu


    Going down a WordPress/CloudFront/redirect rabbithole… or: How I spent my Sunday. https://t.co/2szCIfSEXi 😅


    @gilmae The most painful part is if we had tested any other page than the homepage, we would have solved it six hours faster.


    @gilmae I found this the other day. Enjoy. https://t.co/gopoUzQTzA


    I’ve got a new iPhone with Portrait mode, and the first thing I’ve used it on is this Maple Walnut Cornbread I baked tonight. 😍 https://t.co/lwsrXZO60t https://t.co/kpyLC7tloS


    We are up to Cocktail #12 – a hot toddy! Perfect for a cold winter’s evening. https://t.co/dOeXsGUpez 🍋🥃🍯


    RT @cyetain: You know why I’m giving you a dirty look with my mask on? https://t.co/cHXhue7EEt


    Snoozing. https://t.co/hY8Qt81ZeS https://t.co/7AdMlHr3yR


    @chrisgander If you haven’t found it yet, annotated lyrics on https://t.co/QtwPROiuqJ are amazing. Explain both the hip-hop references and the history, and several are from LMM himself!


    @jeamland @The_McJones Will it be possible for me to earn some sort of Banrock badge or mayorship? Because then I’m IN.


    RT @jimmisimpson: They finally got the Disney World ad right. https://t.co/avy2PUOQXQ


  • Going down a rabbithole…

    Good gracious. This morning I thought I’d just do a quick task on my migrated Lightsail sites: setting up a Lambda function to check every 5 minutes, see if the page contains some specific text, and send me an alarm if the site isn’t up. My first thought was to use CloudWatch Synthetics, but the pricing is a lot higher than just doing it yourself with a Lambda function (though you don’t get spiffy screenshots and such). I kept it simple and happily discovered there’s an existing lambda-canary blueprint available. So I set that up, pointed it at https://www.roalddahlfans.com, and tested it out. It worked great!

    Then the Snook, looking over my shoulder, said, “That’ll be going through CloudFront. Why don’t you point it at the origin subdomain so you know it’s hitting the real WordPress underneath?” Okay, sure. Just to double-check it was working, I went to the origin subdomain in the browser… and was redirected to www. What. Uh, that’s not good. Thinking I had screwed something up, I tried hitting the origin subdomain of web-goddess.org… and that worked correctly, not redirecting to www. What the hell. Why were my two sites behaving differently? And why wasn’t RoaldDahlFans’s CloudFront distro barfing that I had set it up with an origin that was redirecting to itself??

    Over the next seven hours – seriously – the Snook and I beat our heads against this problem. I tried turning on and off various plugins; I grepped both filesystems multiple times looking for differences; I completely rebuilt the CloudFront distribution for RoaldDahlFans; I turned SSL off and on repeatedly; I fiddled with heaps of htaccess settings… and we got nowhere. We determined that on web-goddess, if I went to https://web-goddess.org, it would be redirected to www; but for any other subdomain (foo.web-goddess.org, etc) it would not. But on RoaldDahlFans, it would always go to www regardless of whether you used a subdomain or not. It was so frustrating.

    Wordpress redirect tweet

    Various people chimed in pointing us to various things, without much success. My buddy Peter Wilson mentioned thinking that WordPress had some special behaviour to redirect between www and non-www domains, which eventually ended up in us poring over the redirect_canonical code. The Snook noticed that another thing this module does is try to redirect you to the correct page if you type in a URL wrong. For example, if you try to access https://web-goddess.org/about, WordPress will automatically redirect you to https://www.web-goddess.org/about-me (which is the real address). However, if you do that on any subdomain other than www or non-www, it gives a 404. He went to test whether that was also held true for RoaldDahlFans, and to his surprise, the origin was not redirected! What the hell.

    We determined that the origin subdomain was only redirecting to www on RoaldDahlFans on the homepage. Every other page on the origin subdomain would not redirect. So what’s special about the homepage for RoaldDahlFans.com compared to web-goddess? Well, web-goddess has the homepage set to show the most recent posts, but RoaldDahlFans uses a static page. I changed RoaldDahlFans.com to use the most recent posts, hit up the origin subdomain, and it did NOT redirect. But when I changed it back to a static page, it went back to redirecting.

    SO – there is something in the way WordPress handles sites with static homepages that causes them to be redirected to the Site URL, even if you’re using a random subdomain. If you add anything to the path – subdomain.roalddahlfans.com/index.php, it won’t trigger the redirect. How weird is that?

    Okay, so that finally explains the difference in behaviour between the two sites. My origin subdomain for RoaldDahlFans.com was going to redirect requests for the homepage to www, and there was nothing I could do about it. Which meant that when CloudFront needed to refresh its cache for the homepage, it would hit the origin subdomain… and be redirected to itself? Why wasn’t I seeing an infinite redirect loop crashing my site?

    Cue another hour of poking around. The only way it wasn’t going to crash, the Snook reasoned, was if CloudFront was passing the Host header through to the origin as part of the request. I was not aware of telling it to do that, but…

    CloudFront behaviour

    It turns out that the AWS WordPress plugin, when it set up my CloudFront distribution, helpfully whitelisted the Host header as part of the default behaviour for the site. This is why CloudFront isn’t barfing every time the homepage cache expires.

    So there you have it. What I thought would be a fifteen-minute task sent us down a rabbithole of WordPress, redirects, and content delivery network intricacies. The irony is that after all that, nothing is actually incorrect on my site! It’s all working as intended. We just didn’t know how. The only catch is that if I myself want to bypass CloudFront on RoaldDahlFans.com, I need to append /index.php when I hit the origin subdomain.

    This was not how I intended to spend my Sunday… 😅

  • Photo Post

    I’ve got a new iPhone with Portrait mode, and the first thing I’ve used it on is this Maple Walnut Cornbread I baked tonight. 😍

    I’ve got a new iPhone with Portrait mode, and the first thing I’ve used it on is this Maple Walnut Cornbread I baked tonight. 😍

  • Shared today on Twitter

    @jcnsingapore @kcarruthers @katejinx Totes. *cringe*


    5:57pm – I message @gilmae that I am winning at the tech this weekend.

    7:10pm – It’s nothing but Heisenbugs and race conditions, everywhere I look.

    I deserved that. 😩


    RT @HeartOfPluto_: Thanks to Disney+ I saw the famous #Hamilton broadway musical for the first time and I finally understand why I get so m…


  • Site migration nearly finished…

    Following on from my previous post detailing how I moved this site from shared webhosting to Amazon Lightsail, I’ve since completed a few more of my To Do list items:

    • Installed the Open Graph and Twitter Card Tags plugin and set a default image for sharing to Facebook. I’ve also hooked up my Facebook app ID and secret so I can clear the cache on Facebook when updating a post on my site.
    • Used the WP Sweep plugin to clean up hundreds of old post revisions. I also set a limit in wp-config which will be used going forward.
    • Set up automated security patching as per this guide.
    • Went through my Google Search Console to check for errors and fix where possible.
    • Killed off the old shared webhosting!
  • Shared today on Twitter

    Rebuilding a Passap E6000 computerised knitting machine – That is SO COOL. https://t.co/ILvYo6xnEn (Thanks @apocraphilia for the link!) https://t.co/AyiMB3bc7e


    RT @ryanjhiggins: The symbolism of Betsy DeVos having a bookshelf with no books on it 😂😂😂 https://t.co/UMYh8Pv2Nq


    RT @moorehn: Every woman in leadership who has been told to reduce her visibility so that a man could have more: Please stand up.

    https:…


    The cool thing is, every bit of advice in this mentoring article is equally applicable to tech, if you just swap out the different industry. https://t.co/b96NS72eJu


    @pjf @evanderkoogh Good for you all. I went to the Broadway Shopping Center in Sydney and it was < 5% wearing masks. 🙁


    RT @RoaldDahlFans: Are you a serious Dahl collector? You should check out Richard Walker’s “Guide to Collecting Dahl First Editions”! https…


    No. https://t.co/SbnejkcWoy


  • Shared today on Twitter

    @MichelePlayfair Ugh, do I even want to know? 🙁


    RT @glasnt: You have a 0% chance of being accepted if you don’t submit anything!

    Worst case, you don’t get accepted, but you get experienc…


    @MelissaKaulfuss Well, you’ve made me want them now, so at least you’ve spread it around.


    @laimelde @qikipedia In America it’s just linen, that you put in the linen closet.


    @StampsCom Australia is not on any of those suspended lists, and the last update for it appears to be from April.