Author: Jason Cosper

  • No comments after business hours

    No comments after business hours

    TBH, managing your blog’s comments can sometimes feel like a second job. You want engagement, you love the discussion, but it can also be kind of a drag. For me, especially as I’ve started regularly posting here again, I wanted to maintain some of my off-hours peace without keeping comments off entirely.

    My solution? Setting up business hours — an idea I feel like I stole from Jenn Schiffer, who was maybe doing business hours for some other project of hers — for when folks can leave new comments. Kind of like a brick-and-mortar shop. And the best part? I did it with Nick Diego’s fantastic Block Visibility plugin for WordPress.

    The idea was a simple one: I wanted the comment submission form on my posts to only be visible and submittable between 9:00 AM and 5:00 PM, Monday – Friday, Pacific Time.

    Any comments left during those hours, or any that were already on my site before I flipped this switch, still get displayed perfectly fine. It’s not about silencing discussion — but rather managing when the door is open for people to stop by and talk.

    As I mentioned, the Block Visibility plugin is a lifesaver for this kind of control over all sorts of site components. It lets you set conditions for when any block (or group of blocks) should appear. In this scenario, I’m using the Twenty Twenty-Five theme — though this should work with any block theme — and the process is surprisingly straightforward.

    Once you’ve installed and activated Block Visibility, here’s what you need to do:

    1. Edit your Single Post template: Head into your Site Editor (Appearance → Editor) and navigate to your site’s Single Post template.
    2. Select the appropriate block: Find the block responsible for rendering the actual form where visitors type their comments. In my case, and in many themes, this is the Post Comments Form block.
    3. Open Block Visibility settings: With the block selected, look for the Block Visibility settings in the block inspector panel on the right. You might need to click the lil three-dot menu on the block’s toolbar to find Visibility — or it might be a dedicated panel.
    4. Set the Schedule: This is where the magic happens!
      • Click to add a Date & Time visibility control.
      • You’ll want to set it to Show the block if the schedule applies.
      • For the days, uncheck Saturday and Sunday, leaving Monday, Tuesday, Wednesday, Thursday, and Friday selected.
      • Under During this time interval, set FROM to 09:00 AM and “TO” to 05:00 PM.

    And that’s pretty much it. Now, your site’s comment form will only appear during your designated business hours.

    I also like to add a little notice above the comment area (using a Paragraph block) to let folks know about the commenting hours.

    Something like “The ability to comment on posts is available only during business hours (Monday – Friday, 9am – 5pm UTC).” works just fine.

    It all sounds pretty simple, right? Well, there’s a little wrinkle that I ran into. You might too, depending on your hosting setup.

    Caching is great for site speed, but it can also mean that your comment form might stay open after 5pm or closed after 9am because the cached version of a page is still being served.

    My site is hosted with SpinupWP, which has its own caching layer, on top of object caching. To make sure the changes kick in as promptly as possible, I had to get a touch more technical and set up some server side cron jobs.

    For those comfortable with the command line, or for those whose hosts provide cron access, here’s the fix. I set up two cron jobs: one to run just after comments close, and one to run just after they open.

    Here’s some genericized versions of what I use in cron. You’ll need to adjust the paths and specific caching commands for your own hosting environment:

    # Clear WordPress object cache and [$host] site cache at 9:01 AM, Monday-Friday
    1 9 * * 1-5  cd /path/to/your/wordpress/install && wp cache flush && wp cache purge-site
    
    # Clear WordPress object cache and [$host] site cache at 5:01 PM, Monday-Friday
    1 17 * * 1-5 cd /path/to/your/wordpress/install && wp cache flush && wp cache purge-site
    

    What’s happening here?

    • 1 9 * * 1-5: This is the cron schedule. It means run this command at minute 1, past hour 9 (9:01 AM), Monday through Friday.
    • The second schedule is the same but timed for 17:01 (5:01 PM), also Monday through Friday.
    • cd /path/to/your/wordpress/install: This makes sure the command gets run where your WordPress files live.
    • wp cache flush: This is a WP-CLI command to flush the WordPress object cache.
    • wp cache purge-site: This is a placeholder for your hosting provider’s specific WP-CLI command to purge their site-level cache.

    By running these a minute after the scheduled change to block visibility, we ensure that any cached pages are cleared, and the correct state of the comment form (visible or hidden) is served to visitors.

    It might seem like there’s a few hoops to jump through, especially if caching is a factor for you, but I swear that it’s totally worth it. My site (and its visitors) now respect my office hours, past comments still get displayed, and I’m not tied down by stupid moderation duties.

  • Pocket lint

    Pocket lint

    Well, damn… Pocket is heading off into the sunset. For those of us who saved articles there, this stings. The internet’s a goddamn firehose, and Pocket was a decent enough bucket.

    So, what now? Panic? Freak out? Declare reading list bankruptcy? Nah. There are still ways to hoard your digital treasures.

    When a beloved service shutters, some folks immediately go towards self-hosting. Building your own keep! Be the master of your data!

    I get the appeal. But let’s be real, server maintenance can be a pain in the ass that very few people actually want.

    Make it someone else’s problem

    If you prefer tech that just works without constant futzing, there are solid, affordable open source packages that offer hosted solutions. My top picks are Readeck and Wallabag. You can get ’em hosted for less than a couple of bucks a month. Seriously.

    • Readeck: A clean, straightforward reader. It archives webpages for offline reading with a no-nonsense interface. Honestly, it gets the job done.
    • Wallabag: This open-source option is way more feature rich. It grabs content, has mobile apps, and even supports annotations if you’re of the note taking persuasion.

    “But who,” you might ask, “hosts these for pocket change?”

    Enter PikaPods.

    PikaPods is a great low frills resource for managed web app hosting. While their catalog is limited to a few handfuls worth of apps, they handle upgrades, security, and any of those annoying 3 AM reboots.

    You just send them a few bucks a month — under $2 for both Readeck and Wallabag — and they keep your app running. It costs as much as gas station coffee and solves your problem. No brainer, right?

    Make it your own problem

    Alright, you’re determined. I get it. You want the full neckbeard experience. I can respect that. All you need to do in this case is grab a Raspberry Pi (a 4 or 5 is good, more RAM is always better) and install YunoHost.

    YunoHost is a server control panel aiming to make self-hosting accessible — even if you’re not a command-line wizard — via a surprisingly friendly dashboard for one-click app management.

    Their app catalog is pretty well-stocked for article hoarders:

    • Wallabag (See above)
    • Readeck (Ditto)
    • Linkwarden: More of a bookmark manager with archiving, but still super useful.
    • ArchiveBox: For serious digital packrats, this creates full local website archives.

    The main catch with YunoHost on a RasPi? You’ve gotta update your apps and the YunoHost software itself occasionally. It’s not really a huge burden — YunoHost’s dashboard helps — but slack off, and you’re asking for security problems or broken shit.

    The TL;DR

    Losing Pocket is a bummer, sure. But it’s also a chance to find a new thing that’ll stick around for a good long while thanks to beautiful nerds who also like to hoard articles for years and years and maintain free software.

    For a low-stress, dead-simple solution, PikaPods managing Readeck or Wallabag for a tiny fee is fantastic. Minimal fuss.

    If you’re feeling adventurous, have a Raspberry Pi kicking around your junk bin — or need an excuse to buy yet another one — and don’t mind a bit of tinkering, YunoHost offers a powerful, surprisingly user-friendly way to wrangle things.

    Anyway, your digital hoarding habit isn’t dead — it’s just evolving! Pick your poison, save those tabs, and keep telling yourself that you’ll read them later.

  • A Wappalyzer of my very own

    So, y’all know how it is sometimes… You go digging through GitHub repos looking to see if anyone’s already made a tool to do a specific thing that you need to get done. Something simple and fast that doesn’t do a bunch of extra stuff. Lately, I’ve been wanting a quick way to peek at what sites have been built with without having to tab away from the terminal or poll some third party API. Just a straightforward command-line thing.

    While poking around, I stumbled across a project that wrapped a Go implementation of Wappalyzer in a CLI. Sounds perfect, right? Go is fast, the command line is fast, and Wappalyzer does the thing that I need.

    The old version worked alright — no complaints, really — but nothing on the project had been touched in three years. The Go version was old, libraries were way out of date, and honestly, relying on something that stale just feels… irresponsible?

    Besides, the JSON output that the old version of the Wappalyzer CLI spit out didn’t include the domain name. Which made it slightly less useful when performing runs on a list of domains, which I’m possibly looking at doing.

    Before I start talking about my fixes tho, here’s a quick note on how this tool works. When run, wappalyzer-cli fetches the target site via HTTP, pulling HTML, headers, JavaScript, etc. Then it uses a local database of known libraries, frameworks, and server technologies. No external API calls need to be made for analysis. All of this happens locally.

    I consider this a massive win for privacy! The URLs you scan and site contents all stay on your machine. This means that you’re not feeding some rent seeking business that’ll most likely turn around and eventually funnel this data into some bullshit AI tool. On top of that, you can use this as much as you want without worrying about hitting any API rate limits.

    Anyway, I decided to give this neglected tool a friendly bit of polish. I started by switching things to a more recent version of Go. Then I bumped all of the dependencies. Once that was done, I ensured that everything still ran. Finally, I hacked the domain name into to the JSON output. Now I’ll be able to tell which site each set of results belongs to in batch runs.

    It’s still the same fast tool that it was before. It’s just a bit better now. If you want a quick, reliable site intelligence tool, go check out my updated version over on GitHub.

    Feel free to kick the tires, open an issue, or send a pull request if you’re really feeling sassy. I’m still learning Go, so it might take a minute for me to figure out how to fix whatever bugs folks might surface, but I’m still happy to give it the old college try.

  • Automaddic

    Automad / A Flat-File CMS and Template Engine
    Automad is a fast and lightweight flat-file content management system and template engine for creatives that can be used in a monolithic or headless mode.
    automad.org

    After spending close to twenty years clicking around the WordPress dashboard, I’m finding Automad’s whole “minimalist CMS” vibe deeply refreshing.

    I played with a demo of version 2, goofed around a bit with the extensions on offer, and not once did I have to dismiss a dashboard notification or suffer through a premium upsell offer. Truly glorious.

    The fact that it’s written in PHP — something that I have plenty of experience with — is also pretty damn nice.

    I’m definitely going to have to spend some more time messing around with this.

  • A little housekeeping

    If — by some minor miracle — you’re still following this site in your favorite RSS reader, you might’ve noticed that I’ve been a busy little beaver over the last several days. What’ve I been up to? Well…

    • I migrated some archival content over from a couple of side projects that stalled out.
      • gomi no sensei, my early COVID-19 pandemic, Doctorow style, dailyish newsletter that I ran for a few weeks in early 2020.
      • blog.boogah.org, a more personal site where I didn’t have to worry about all the technical debt that I’d accumulated here.
    • I migrated all of my site’s content over to using blocks via the WP-CLI bulk converter added to 10up’s great Convert to Blocks plugin.
    • I updated about ninety posts in the Linked category to use the Bookmark Card block instead of Daring Fireball style links. This decision was made mainly because the plugin I was using hadn’t been updated in at least 11 years. 😅
    • Getting rid of that ancient plugin freed me from the technical debt that was holding me back from changing themes and embracing Full Site Editing in WordPress. I’m using Davis Blocks as my current theme, but will likely cycle through a few until I find one that feels like “home”.

    Does this mean that I’m going to start posting here again? Honestly, at this point, I’ve learned to not make promises that I don’t know if I can keep. So let’s just say maybe.

    Cool?

  • I don’t know if you can hear me

    Teenage Fanclub – Start Again

    Even though it’s complicated
    We’ve got time to start again

    Teenage Fanclub, “Start Again”
  • Fresh Fruit for Rotting Vegetables, 05.18.20

    This content was imported from gomi no sensei, a project I briefly did during the early months of the COVID-19 pandemic. Instead of maintaining yet another WordPress install, I’ve decided to shove this content into the everything bucket that is my long running personal blog. 🥴

    And it keeps coming and it keeps coming
    And it keeps coming ’til the day it stops

    LCD Soundsystem, Someone Great

    Sometimes, you get overwhelmed by life and let things fall by the wayside. You don’t mean to do it. It just sort of… happens.

    Eventually, you make it to the other side. But then you find yourself filled with the overwhelming desire to figure things out.

    So… what now? You can’t say “I’m never going to let this happen again.” because never sure as hell is a mighty long time.

    You’ve just got to find the thing that’ll work for you, and then try to do that thing for as long as you can.

    Anyway… How about some links?


    GMK Redacted Keycap Set

    Not to go all mechanical keyboard guy on y’all, but this pre-order (through June 2, 2020) for a keycap set with a number of redacted keys is very much my vibe.

    Stan Lee vs Rob Liefeld & Todd McFarlane

    Now, I know this video is 28 years old, but I found it while doing a deep dive on YouTube a couple weeks ago and it is fantastic.

    In it, Stan Lee lowkey savages Liefeld and McFarlane while they create one of the greatest examples of dumb 1990’s comic book maximalism, Overtkill.

    The Third Quarter of Isolation

    We may now be entering the dreaded third quarter of hollow-eyed stares, odd fixations and brooding resentment. Time grows sludgy. The days blur into the nights, and the weekdays into the weekends. You’ve hidden the notifications from a recently downloaded exercise app and you’re no longer telling people you’ll learn Italian. You begin to suspect that your friends have their own Messenger group.

    See also: Fuck the Bread. The Bread Is Over.

    Stealing Home

    In lieu of watching the Dodgers play baseball this summer, I’ve decided to read this instead and grapple with the complicated history of one of my favorite teams. (thx) 😬

    Tonight We Riot

    Over the past couple weeks, I’ve spent a decent amount of time playing this Switch brawler that allows you to control a whole movement of people trying to throw off the shackles of capitalist oppression. 🌹

    It’s unapologetically leftist, and I fucking love it.

    Bad Baby Names

    Why let Space Karen and Grimes have all the fun?

    P.S. Please join us in welcoming our new child, Dr. Bronner Paulblart, Reloaded. 👶🏻

    The Father of the Title Sequence

    On what would have been his 100th birthday, Criterion celebrates one of my all-time favorite designers, Saul Bass.

    This Word Does Not Exist

    AI generated words, with definitions. Some of them feel as if they’ve been lifted out of a William Gibson novel. (via)

    The Conspiracy Museum

    A short story by Robin Sloan for The Atlantic’s Shadowland.

    David Lynch’s Weather Report

    Back in the early aughts, David Lynch used to do the weather report for LA alternative station, Indie 103.1‘s morning show. I don’t even know why he did it, but I’ll be damned if I missed a single one of them.

    As of last week, he’s started doing them again and putting them up on YouTube. Even though I no longer live in LA, I’ve happily watched every. single. one.

    I Paint Any Ass

    You give them €40 and a photo of your butt and you get back a painting. Dunno what else to say about it, TBH.


    Jeez. Seems like I’ve been saving them up for a while, huh? 😂

    We’ll (hopefully) talk again soon!

  • Fresh Fruit for Rotting Vegetables, 04.27.20

    This content was imported from gomi no sensei, a project I briefly did during the early months of the COVID-19 pandemic. Instead of maintaining yet another WordPress install, I’ve decided to shove this content into the everything bucket that is my long running personal blog. 🥴

    I wish weekends felt more like weekends and less like days where I’m not financially obligated to sit at my computer. I need something relaxing, but everything rn is stressful and weird.

    Usually, when I’m feeling stressed, I take a few days off, pack the dogs and Sarah into the Jeep, and head out to Palm Springs or Pismo Beach. Don’t really have that luxury right now.

    I guess I need to upend my routine or something. 🤔


    Mini vMac 3DS

    The total lack of documentation on the GitHub page for this project is very much a “You’re on your own, bro.” sort of statement. But if you can get it to work — and people have — you can run System 7 on a 3DS. 😍

    GoldenHour

    A macOS app that adds a translucent, color temperature adjustable overlay on your screen.

    Pretty handy! Especially since all of the key lights that are worth a shit are sold out rn. (via)

    Baphomet Pee-wee Herman Sticker

    I mean, it’s kind of all right there in the title, isn’t it? (via)

    The Cool Quarantine, Episode 2

    I missed this when it dropped last week, but Henry Rollins is back with another 4 hours of great freeform radio.

    “Expert Twitter” Only Goes So Far

    Twitter was optimized for links and short musings. It’s not well suited for complex discussions or nuanced analyses. As a result, the feeds of these newly emerged pandemic experts are often a messy jumble of re-ups, unrolled threads, and screenshot excerpts of articles. We can do better.

    TL;DR: Get a blog.

    I’ve already got one, so I’m sure you can understand how I might be bullish about them… 🤣


    Five is good for today, right?

    Until next time, friends!

  • Fresh Fruit for Rotting Vegetables, 04.23.20

    This content was imported from gomi no sensei, a project I briefly did during the early months of the COVID-19 pandemic. Instead of maintaining yet another WordPress install, I’ve decided to shove this content into the everything bucket that is my long running personal blog. 🥴

    We’ve got a war on our hands, people.

    The springtime gophers that have taken up residence in our back yard have been going off this year. When I woke up this morning, I found at least four new mounds of varying sizes scattered about.

    Last year, a heavy blanket of Uncle Ian’s all over our yard took care of them. But I checked the garage a few days ago, and found that I maybe have enough to funnel into each one of their mounds before flattening them back out.

    That’ll keep them away for a minute, but I’m definitely going to need to order more repellent. Maybe a sonic spike or two. 🤔

    Heaven forbid I have to go full Caddyshack on their lil asses…


    Porcupine Racetrack 2020

    Members of 90s comedy troupe The State reunite (virtually) to do a cover of their classic Porcupine Racetrack sketch.

    I’ve already watched the cover and the original at least five times each. It is very much my happy place. I hope that maybe it’s yours too.

    FAQ: Composting

    McSweeney’s comes through with a composting FAQ that goes off the rails very quickly.

    6 Feet Back or 6 Feet Under

    My buddy Derek made a new tee that’s perfect for anyone who’s courageous enough to wander outside rn.

    TiddlyRoam

    An open source fork of TiddlyWiki with features similar to the (eventually premium) SaaS offering Roam.

    I’ve been keeping my outboard brain in nvALT for ages, but before that I used Instiki. I kind of miss having a personal wiki, so maybe I’ll import some content over and try living with it… (via)


    Alright… I need to get a little exercise in before I start working on dinner. Only ~13 minutes worth, according to my watch.

    Cheeseburgers tonight! Pretty nice

  • Fresh Fruit for Rotting Vegetables, 04.22.20

    This content was imported from gomi no sensei, a project I briefly did during the early months of the COVID-19 pandemic. Instead of maintaining yet another WordPress install, I’ve decided to shove this content into the everything bucket that is my long running personal blog. 🥴

    We’ve got a big one today. The next post might suffer for it, but why should I sit on all of these tasty morsels and end up get scooped by the likes of Kottke and Waxy? 😄


    Epidemic Lofi

    Let’s kick the day off on a chill note. This Soundcloud playlist from Epidemic Sound has damn near 200 songs worth of lofi hip hop vibes to get you through your day.

    I don’t know about you, but I’ll use whatever I can to get through my day at this point.

    Blind Users Struggle with State Coronavirus Websites

    Forty-one of the 50 state pages we surveyed contained low-contrast text, which can be challenging for users with low vision, including seniors, who are at higher risk in the outbreak.

    Navigation was another challenge for users with visual disabilities. Thirty-one of the 50 state pages contained empty links or buttons, which means a screen reader will not be able to tell the user what the button does or where the link is supposed to go.

    😞

    Of course most of these sites are lousy on accessibility. People with disabilities tend to be an afterthought all over the web.

    Big Honking Button

    Why press Y to honk when you can press a big honking button instead?

    This is more than “just a button” though — it’s a hackable, one-button sampler that runs CircuitPython.

    Psilocybin Produced in Yeast

    Too bad there’s a yeast shortage, because I could really stand to get trip balls on some dough rn. 🍞

    Gophers

    Keep a gopher network alive in a post-apocalyptic wasteland – your community will thank you for it.

    I’m pretty fucked out on post-apocalypse shit at the moment, but I really adore the concept and style of this (free!) game produced as part of Ludum Dare 46. (via)

    98.css

    Nothing means anything anymore — and, as we covered the other day, the internet feels pretty 90s lately — so why not make something that looks like Win98? (via)

    People of the Pandemic

    An effective visualization of how a pandemic can spread through a community, masquerading as a game. 🦠🕹

    I find it interesting that the game uses the decisions of 19 previous players to inject a little entropy into your decisions. Because, in situations like these, you’ve always gotta worry about what the other assholes in your town are doing… 🙄

    MonoLisa

    I know what some of y’all are saying… “$350 for a typeface for my terminal?! Are you high?”

    I mean, a little. 😬 Don’t worry though — there’s also a more modest $70 version for the junior ballers in the crowd.

    Still, take some time to look at the specimen and fuck with the playground on the site. I’m sure you’ll agree that MonoLisa is a beaut.


    Hoo boy. 🥱 Let’s call it a day, shall we?

    Hope to see all you nice people back around here soon!

    P.S. I’m still crossposting these regular link dumps 💩 to my newsletter. If you’re still not reading RSS feeds because you haven’t quite gotten over losing Google Reader, you should subscribe.