Links For You (11/30/24) / / No Comments Hello folks – I’m a week or so behind on my schedule for these posts, but the last few weeks have been incredibly hectic. I had 5 or so (I’ve lost track honestly) online presentations and one in-person event at connect.tech, and of course, this week was Thanksgiving. I’m also behind on scheduling for my <Code><Br> show, which I hope to fix up later today. I wish I could look forward to things get less busy, but the next few weeks will be busy as well! I’ve got two upcoming presentations on Gen AI coming up! Ok, enough whining, let me share some links! Avoid Amazon’s Echo Show In theory you can stop reading at the title, Please don’t buy an... more → Posted in: JavaScript Tagged with: 11/30/24, links
Using Generative AI to Parse Web Pages into Data / / No Comments A few months back, I took a look at using JSON-LD to turn a recipe web page into pure data: Scraping Recipes Using Node.js, Pipedream, and JSON-LD. This relied on a recipe actually using JSON-LD in the header to describe itself, which is pretty common for SEO purposes. Still, I was curious as to how well generative AI could solve this problem. In theory, this could be a good ‘backup’ in cases where a site wasn’t using JSON-LD and a general exploration of ‘parsing’ a web page into data. I’ll be using Google Gemini again, but in theory, this demo would work in other services as well. Here’s what I found. Converting a Web Page into Structured Data In order... more → Posted in: JavaScript Tagged with: data, Generative, into, Pages, Parse, using
Using Your Favicon for Monitoring Long Processes / / No Comments A week or so ago, I was doing some tests on Google Colab and noticed something interesting. The notebook I was using was one that took one to two minutes to process. Before I’d start the process, the favicon looked like so: After kicking off the workflow, the favicon changed like so: To be honest, I had not noticed it earlier, but I only fairly recently started using a somewhat ‘slow’ notebook so it’s possible I just didn’t need it before. Realizing how it’s being used now, I thought it was an excellent user experience feature and looked into how to use it in my own applications. Changing the Favicon Ok, so this part is stupid easy. Assuming you’ve... more → Posted in: JavaScript Tagged with: Favicon, long, Monitoring, Processes, using
Intl is your Superhero / / No Comments Last week I had the pleasure of presenting at the Mid-Michigan ColdFusion Users Group on the topic of Intl, the web platforms internationalization spec. I gave this presentation again this week at connect.tech as well. I greatly enjoyed working on this deck as I’ve been using Intl for a while, but had not had the opportunity to look into every nook and cranny. The slide deck may be found here https://github.com/cfjedimaster/intl-is-your-superhero/ and viewed online at https://cfjedimaster.github.io/intl-is-your-superhero/decks/main/. The demos are all up on CodePen within one collection, which you can peruse here: https://codepen.io/collection/oEKOwR And then finally, if you love hearing... more → Posted in: JavaScript Tagged with: Intl, Superhero
Counting Words with Intl.Segmenter / / No Comments Yesterday, I gave my presentation on Intl, the browser’s built-in support for internationalization. I’ve been using this for a while now, but while researching the spec for my presentation, I ran into multiple cool aspects of it I wasn’t aware of. One feature I thought was particularly interesting was the Segementer object. MDN’s description is nice and succinct: The Intl.Segmenter object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string. In particular, I thought the ability to get words would be an interesting use case. In the past, I’ve either done a lame split on " ", or used... more → Posted in: JavaScript Tagged with: Counting, Intl.Segmenter, Words
Links For You (11/11/2024) / / No Comments The last seven days have been… difficult. I don’t think I need to go into why (even for my non-American readers), but I am doing my best, as are a lot of people, to take things day by day. Honestly, as a white hetero man, I’m not so much worried for myself, but I’m deeply concerned about my family and friends who are LGBTQ+ and other minorities. I don’t talk a lot about my children here as I want to ensure their privacy is maintained, but seven of my kids are adopted and Asian and my usual worry for them has risen quite a bit. Normally, my links here are almost always tech-related, but today I’m going to do something different. The links below are resources... more → Posted in: JavaScript Tagged with: 11/11/2024, links
Executing Dynamic Code in a Reveal.js Presentation / / No Comments Please take what follows with a Titanic-sized grain of salt and do your best not to do what I did, but despite that, I thought this little hack was interesting and I figured I’d share it anyway. I typically use Reveal.js for my presentations, especially when talking about the web platform, as it makes it easy to do slides and demos, all in my browser. Usually when I want to embed live code in a slide, I just use a CodePen embed. While this works well, sometimes it feels like overkill for real short code samples. I wondered if it would be possible to execute code directly in the slide itself such that I could show a one-liner in the slide, and then the result after. This is what I came up... more → Posted in: JavaScript Tagged with: code, dynamic, Executing, Presentation, Reveal.js
Automatically Posting to Bluesky on New RSS Items / / No Comments Hey folks – just a quick warning. This post is kind of a mashup/update of two earlier posts. Back almost two years ago I talked about this process but used Twitter and Mastodon: "Automatically Posting to Mastodon and Twitter on New RSS Items". Earlier this year I first talked about using the Bluesky API, with a very appropriately named post: "Using the Bluesky API". As I said, this post is going to mash up bits from both, and include new things I’ve not covered before, but for those of you who have been around here for a while, some of this may be repetition. For this solution, I’m using Pipedream. I’ve blogged for years now and love it. Their free... more → Posted in: JavaScript Tagged with: automatically, Bluesky, items, Posting