Add Squirrelly Support to Eleventy / / No Comments I’m supposed to be on vacation but writing about Eleventy two days ago has got it fresh on my mind, also, I can’t pass up an opportunity to use "squirrelly" in a blog title. I subscribe to three or four different email newsletters related to web development. It’s fairly normal to see the same link shared among a few of them. Most recently an example of this was the Squirrelly library. This is, yet another, JavaScript template language and I thought I’d take a look at it in my spare time. Given that Eleventy makes it easy to add other template languages, how long does it take you to add support for it? Step One – Make Your Eleventy project # Technically... more → Posted in: JavaScript Tagged with: Eleventy, Squirrelly, Support
Virtual Reality OpenStreetMap / / No Comments osm4vr is a virtual reality world built using OpenStreetMap map tiles and building footprints. Using osm4vr with a VR headset you can explore the world in virtual reality. Alternatively, if you don’t have access to a headset you can simply fly around the world in your browser instead.Most of the 3d buildings are created using OSM building footprints with building heights, so the graphics can be Maps Mania… more → Posted in: Interactive Maps Tagged with: OpenStreetMap, reality, Virtual
An Online Mastodon Archive Viewer / / No Comments Here’s a quick write-up of something I actually built a week or so ago… and forgot to share on the blog. Instead, I shared a way to integrate your Mastodon with Eleventy. In that post, I mentioned how the account Fedi.Tips was looking for ways to let people view their archived Mastodon data. I followed their guide on getting my export and started work on a simple viewer. If you don’t care about the "how", and have your archive ready, just head on over to https://tootviewer.netlify.app and upload your zip. The Archive # When you get your Mastodon archive, it will be a zip file containing the following: actor.json: A file related to the user, yourself probably. avatar.jpg:... more → Posted in: JavaScript Tagged with: Archive, Mastodon, online, Viewer
30 Days of Crashes in New York City / / No Comments Between June 16th and July 15th, 149 people were injured by cars in the planned New York congestion zone and 4 people were killed.At the beginning of June New York Governor Kathy Hochul canceled New York City’s planned congestion zone. Under the planned congestion zone vehicles traveling into or within the central business district of Manhattan would have been charged a fee. In response to Maps Mania… more → Posted in: Interactive Maps Tagged with: City, Crashes, Days, York
Caching Input with Google Gemini / / No Comments A little over a month ago, Google announced multiple updates to their GenAI platform. I made a note of it for research later and finally got time to look at one aspect – context caching. When you send prompts to a GenAI system, your input is tokenized for analysis. While not a "one token per word" relation, basically the bigger the input (context) the more the cost (tokens). The process of converting your input into tokens takes time, especially when dealing with large media, for example, a video. Google introduced a "Context caching" system that helps improve the performance of your queries. As the docs suggest, this is really suited for cases where you’ve got... more → Posted in: JavaScript Tagged with: Caching, Gemini, Google, input
Web Component to Generate Image Color Palettes / / No Comments Chalk this up to something that is probably not terribly useful, but was kind of fun to build. A few weeks ago I came across a site talking about the colors used in the Fallout TV show. I grabbed a screenshot of how they rendered it: Unfortunately, I didn’t make note of the site itself and I can’t seem to find it anymore. I really dug how it showed the palette of prominent colors directly beneath the image itself. Using this as inspiration, I looked into how I could automate this with a web component. To get the color palette, I turned to a library I’ve used many times before, Color Thief. Given an image, it can return either the most dominant color of an image or return an... more → Posted in: JavaScript Tagged with: Color, Component, Generate, Image, Palettes
Your Urban Heat Island Score / / No Comments Climate Central has mapped out the urban heat island hot-spots in 65 major U.S. cities. Each city map on Climate Central’s Urban Heat Hot Spots shows an Urban Heat Island (UHI) Index score for each census tract, revealing where UHI boosts temperatures the most and least in each city.As well as providing individual UHI maps for 65 cities Climate Central has also released a national interactive Maps Mania… more → Posted in: Interactive Maps Tagged with: Heat, Island, score, Urban
Scraping Recipes on the Web – Now with Display and Print / / No Comments A few weeks back I wrote up the process of building an API that looks for JSON-LD on a web page containing recipe information, parses it, and returns it as pure data. You can (and should before continuing on) find that post here: Scraping Recipes Using Node.js, Pipedream, and JSON-LD. When I first shared this, someone (I forget your name, but thank you!) asked the natural follow-up question – can we then render this to HTML or PDF? The answer is, of course, I just had to stop being lazy and build a proper web app. I fired up Glitch and created the following little demo. It isn’t the prettiest demo, but it gets the job done – converting a recipe site that’s 90% adds/commentary... more → Posted in: JavaScript Tagged with: display, print, Recipes, Scraping