Links For You (8/18/2024) / / No Comments Woot, welcome to football season! Ok, preseason, but I am beyond excited to watch my Saints play later today and, hopefully, look halfway decent. My wife and I are both big football fans and the start of the season is always a happy occasion. This past week I traveled to Atlanta to give a lab on Adobe’s Firefly Services APIs which went well, and I get to do it again next week in New York City. I hope your week goes well, and here are some interesting links for you to enjoy. Migrating from Netlify to Cloudflare In this post, Sia Karamalegos discusses how she migrated her site from Netlify to Cloudflare. This was done primarily due to Cloudflare releasing a new service to block AI crawlers,... more → Posted in: JavaScript Tagged with: 8/18/2024, links
Setting Dynamic Objects Keys in JavaScript / / No Comments It’s always a good day when you get pleasantly surprised by JavaScript, even more so when you find that it’s a feature that’s been around for a while (ES6, which according to Google was standardized in June of 2015). Earlier today I saw some syntax that didn’t look quite right to me. Here’s a simple example of it: let type = 'name';let person = { [type]:'Ray'} Specifically, the thing that surprised me was this portion: [type]:'Ray' If you console.log the code above, you get: { name: 'Ray' } And then it makes sense. This syntax allows you to set a dynamic key in an object literal, much like: person[type] = 'Ray'; Apparently, this has been around for nearly ten... more → Posted in: JavaScript Tagged with: dynamic, JavaScript, Keys, Objects, setting
A Quick Look at AI in Chrome / / No Comments Google announced a while back their intent to experiment with generative AI in the browser itself. Personally, I think this could be a really good idea, but I’m really unsure as to how many other vendors would support it. With Edge being a Chromium product, and Microsoft being pro-GenAI, it seems like a safe bet it would support it. Safari and Firefox… I honestly feel like they probably never would. That being said, initial support landed in Chrome Canary (the bleeding edge version of Chrome) and I thought I’d take a quick look. Here’s what I found. Setting it Up To test this new feature, you need either Chrome Canary or Dev. Enabling support requires tweaking two flags... more → Posted in: JavaScript Tagged with: Chrome, Look, Quick
Next Code Break – August 6 / / No Comments Hey folks, earlier last month, I mentioned a tweak to my <Code><Br> schedule, and originally I was going to have one today, but that has been pushed out to August 6th. You can find out more here: Hacking Arduino Hardware as a Noob Pt. 2 My plan is to continue showing Arduino/web integration and I’ve got an interesting bug to share. (I love it when I make mistakes that are good lessons!) I hope to see you there! Raymond Camden… more → Posted in: JavaScript Tagged with: August, Break, code, Next
How to Add a Header to a curl Request / / No Comments curl is one of those great utilities that’s been around seemingly forever and has endless use cases. These days I find myself using curl to batch download files and test APIs. Sometimes my testing leads me to using different HTTP headers in my requests. To add a header to a curl request, use the -H flag: curl -X 'GET' \ 'https://nft.api.cx.metamask.io/collections?chainId=1' \ -H 'accept: application/json' \ -H 'Version: 1' You can add multiple headers with multiple -H uses. Header format is usually [key]: [value]. The post How to Add a Header to a curl Request appeared first on David Walsh Blog. David Walsh Blog… more → Posted in: JavaScript Tagged with: curl, Header, Request
Automating Background Removal with Firefly Services / / No Comments As a quick FYI, if you would rather skip reading my text and jump to a video, I’ve got one at the end of this post. Be my guest to scroll down and watch that instead. One of the most interesting aspects of Adobe Firefly Services is what it enables in the automation space. I think it’s fair to say that these automations will still be followed up by a human checking, tweaking, and adjusting results, but if the APIs can save a significant amount of time, that’s got to be a great benefit. Let me demonstrate one simple example of this – removing background images at scale. The Remove Background API The Remove Background API is part of the Photoshop API family and handles the... more → Posted in: JavaScript Tagged with: Automating, Background, Firefly, removal, Services
Upgraded to Eleventy 3.0 (Beta) / / No Comments Like I assume most of my fellow Eleventy users have been doing, I’ve been closely following the updates on Eleventy and its progress towards 3.0. As my blog is a fairly large site, I wasn’t in a rush to upgrade to an Alpha release, but the recent beta release convinced me it was time to take the plunge. The TLDR is that… it took me roughly an hour (most of which was by choice, I’ll explain below) and it’s been smooth sailing. Want to know more? Keep on reading… The Upgrade Helper Per the release notes, I made use of the upgrade helper which is a plugin you install along with, of course, upgrading your site to Eleventy 3. This worked well and flagged my only... more → Posted in: JavaScript Tagged with: Beta, Eleventy, Upgraded
Links For You (8/3/2024) / / No Comments The past few weeks have been a bit crazy, although mostly crazy good. Since the last one of these posts, my family and I went on vacation in San Antonio for a few days, and currently, my wife and I are in New Orleans for a short break. Last night we went to the Postmodern Jukebox concert which was easily one of the most fun concerts I’ve been to. I’ll share one of their clips at the end, but let me just say that they were a real treat live. CSV for Eleventy First up is a great example of why I love Eleventy – its flexibility. This post, "Eleventy – Add CSV data file support" describes how you can use CSV files in Eleventy to drive your content. Eleventy’s... more → Posted in: JavaScript Tagged with: 8/3/2024, links