Getting and Displaying a Mastodon Post in Client-Side JavaScript / / No Comments I’ve got a few pages here that are primarily built for my own use. One of them, my bots page, is a list of all the dumbsuper useful bots I’ve built for Mastodon (and Bluesky). The idea on this page is to show the latest post from each bot. The bots page makes use of two different shortcodes written in Liquid to do this. The first uses the RSS feed of the bot to get their last toot ID: const lastToot = async (instance, user) => { let rssFeedURL = `https://$ {instance}/users/$ {user}.rss`; try { let feed = await parser.parseURL(rssFeedURL); return feed.items[0].guid.split('/').pop(); } catch(e) { console.log(`getting last toot for $ {user} returned an error`); return... more → Posted in: JavaScript Tagged with: Clientside, Displaying, Getting, JavaScript, Mastodon, Post
Automating Blog Post Headers with Firefly Services / / No Comments Yesterday I introduced you to Adobe’s new offering, Firefly Services, and demonstrated a simple example of how to generate images from prompt using the REST APIs. Today I thought I’d share one of the little demos I’ve made with the API, and one specifically built to help out with my blog – generating headers. My usual process for headers is to go to the Firefly website, enter a prompt, let it load, and then promptly change it to landscape and re-generate my prompt again. I always feel bad that the initial, square, images are essentially trashed. It occurred to me I could build a Node.js utility to generate the images at the exact right size and even quickly display them.... more → Posted in: JavaScript Tagged with: Automating, blog, Firefly, Headers, Post, Services
Followup to My Intl Short Number Post / / No Comments A few days ago I shared a blog post about using the Intl object in JavaScript to create short, more readable numbers. So for example, instead of 9123456, it would display 9.1M. This was done using the notation option in Intl.NumberFormat. Yesterday I randomly ran into an interesting modification on this using yet another option, compactDisplay. The compactDisplay option is only used when notation is set to compact. It supports two options, short which is default and what I demonstrated in the previous post, and long. So given a number, i, you would use it like so: new Intl.NumberFormat('en-US', { notation:'compact', compactDisplay:'long'}).format(i); And the result is, well, longer. 😉 What’s... more → Posted in: JavaScript Tagged with: Followup, Intl, Number, Post, Short
Quick Test Post – Sorry! / / No Comments Hey folks, earlier this week I posted about a Pipedream workflow to automatically post new blog entries to Mastodon and Twitter. I discovered an issue with the workflow that ended up being a bug on the Pipedream side. (It happens!) They’ve corrected the issue and I need to test, so I’ve temporarily disabled Mastodon posting and am writing this post just to see if it posts correctly to Twitter. If so, I’ll then restore the Mastodon step (Pipedream makes it easy to disable one part of a workflow) and see what happens when I post again. As I feel guilty "spamming" my subscribers with noise, here’s a quick tip. If you ever need to expose a local web site for external... more → Posted in: JavaScript Tagged with: Post, Quick, Sorry, test
From Maps to Apps: Introducing Students to Argument-Mapping (guest post) – Daily Nous / / No Comments From Maps to Apps: Introducing Students to Argument-Mapping (guest post) Daily Nous “map app” – Google News… more → Posted in: Interactive Maps Tagged with: apps, ArgumentMapping, Daily, from, guest, Introducing, maps, Nous, Post, students
Beyond ‘Siri, what’s the weather?’: The pocket guide to forecasting from your phone. – Washington Post / / No Comments Beyond ‘Siri, what’s the weather?’: The pocket guide to forecasting from your phone. Washington Post “map app” – Google News… more → Posted in: Interactive Maps Tagged with: Beyond, forecasting, from, Guide, phone, pocket, Post, Siri, Washington, Weather, What's
Apple updated maps app to compete with Google Maps – New York Post / / No Comments Apple updated maps app to compete with Google Maps New York Post “map app” – Google News… more → Posted in: Interactive Maps Tagged with: Apple, compete, Google, maps, Post, updated, York
Download these 9 apps before your next trip abroad – The Washington Post / / No Comments Download these 9 apps before your next trip abroad The Washington Post You might have guessed Google Maps (for not only directions, but also itinerary spots), but Tinder, a VPN *service* and other apps could ease your journey in just … “map app” – Google News… more → Posted in: Interactive Maps Tagged with: abroad, apps, before, download, Next, Post, these, Trip, Washington