Who is Your Closest Team? / / No Comments If you have ever wondered which baseball team you should support then you need Maptitude’s Closest Major or Minor League Baseball Stadium by Drive Time map. The map shows you which affiliated major or minor baseball stadium you can drive to in the quickest time in the contiguous United States.The map is a sort of combination of a voronoi diagram and an isochrone map. However, Maps Mania… more → Posted in: Interactive Maps Tagged with: closest, Team
Creating a Content Assistant with Gemini and GenAI / / No Comments One of the use cases for generative AI that I’ve discussed before is the idea of using the tool to aid in the writing process. I’m not talking about creating content so much as creating suggestions and providing feedback about the content you yourself have created. This past weekend I worked on a "general purpose" tool with this in mind and thought I’d share it to get your feedback. ("You" being the smart readers of this blog who keep me honest when I show something stupid. 😉 The Application # The application itself is rather straightforward. It asks two questions – first, what are you trying to accomplish with your writing and what are the desired... more → Posted in: JavaScript Tagged with: Assistant, Content, creating, Gemini, GenAI
How to Set Date Time from Mac Command Line / / No Comments Working on a web extension that ships to an app store and isn’t immediately modifiable, like a website, can be difficult. Since you cannot immediately deploy updates, you sometimes need to bake in hardcoded date-based logic. Testing future dates can be difficult if you don’t know how to quickly change the date on your local machine. To change the current date on your Mac, execute the following from command line: # Date Format: MMDDYYYY sudo date -I 06142024 This command does not modify time, only the current date. Using the same command to reset to current date is easy as well! The post How to Set Date Time from Mac Command Line appeared first on David Walsh Blog. David Walsh... more → Posted in: JavaScript Tagged with: Command, date, from, line, time
Find Your Future Climate Zone / / No Comments In fifty years time Los Angeles will no longer be in a temperate climate zone. As a result of climate change the climate in LA in 2070 will closely resemble the climate of New Delhi today. The average temperature will increase from 59.8°F to 65.2°F and LA can expect hot and arid summers.You can discover if your city will be changing climate zones in the near future (it will) on The Pudding’s Maps Mania… more → Posted in: Interactive Maps Tagged with: Climate, Find, future, Zone
Case Insensitive CSS Attribute Selector / / No Comments CSS selectors never cease to amaze me in how powerful they can be in matching complex patterns. Most of that flexibility is in parent/child/sibling relationships, very seldomly in value matching. Consider my surprise when I learned that CSS allows matching attribute values regardless off case! Adding a {space}i to the attribute selector brackets will make the attribute value search case insensitive: /* case sensitive, only matches "example" */ [class=example] { background: pink; } /* case insensitive, matches "example", "eXampLe", etc. */ [class=example i] { background: lightblue; } The use cases for this i flag are likely very limited, especially if this flag is knew knowledge for... more → Posted in: JavaScript Tagged with: Attribute, Case, Insensitive, Selector
Mapping the Big Map Index / / No Comments The Economist’s Big Mac Index compares the purchasing power parity between the currencies of different countries by examining the price of a Big Mac hamburger sold at McDonalds’ restaurants in each country. The Index “is based on the theory of purchasing-power parity, the notion that in the long run exchange rates should move towards the rate that would equalize the prices of an identical Maps Mania… more → Posted in: Interactive Maps Tagged with: Index, Mapping
PDF Embed Web Component Available Via NPM / / No Comments Earlier this month, after being motivated by Thomas Steiner, I went through the not-really-a-hassle process of publishing <table-sort> to NPM. (Table-Sorter Available Via NPM) Today I’ve done the same for another web component, <pdf-embed>. This component wraps Adobe’s PDF Embed API, which, honestly, isn’t an API, but a JavaScript library to embed PDFs inline with the rest of your document. Given this HTML: <pdf-embed url="https://documentservices.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf" width="100%" height="500px" key="33f07f2305444579a56b088b8ac1929e"><p>Read our cool PDF <a href="https://documentservices.adobe.com/view-sdk-demo/PDFs/Bodea... more → Posted in: JavaScript Tagged with: available, Component, EMbed
Adding Your Buttondown Email Stats to Your Website / / No Comments I’ve been using Buttondown for almost a full year now (I blogged about the setup here). After having a few issues with Mailchimp and my newsletter, I was pleasantly surprised by how easy Buttondown was and how quick it was to set up. I ended up paying for it as I knew I’d end up paying for some solution and Buttondown worked great and wasn’t expensive. For a while now, I’ve had a custom-built stats page on my blog that’s primarily built for me. It reports on multiple different parts of my site and its biggest use is to let me quickly judge how well I’m keeping to my publishing schedule (a post a week). One stat it didn’t have that I’ve been checking... more → Posted in: JavaScript Tagged with: Adding, Buttondown, email, Stats, Website