Automating Blog Post Headers with Firefly Services
Raymond Camden's Blog
by Raymond Camden
1d ago
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 utilit ..read more
Visit website
Automate Generative Image APIs with Firefly Services
Raymond Camden's Blog
by Raymond Camden
1d ago
Adobe Summit is currently happening in Vegas and while there's a lot of cool stuff being announced, I'm most excited about the launch of Firefly Services. This suite of APIs encompasses the Photoshop and Lightroom APIs I've discussed before, as well as a whole new suite of APIs for Firefly itself. Best of all, the APIs are dang easy to use. I've been building demos and samples over the past few weeks, and while I'm obviously biased, they're truly a pleasure to use. Before I go further, do know that while the docs and such are all out in the open, there isn't a free trial. Yet. Basics # First ..read more
Visit website
Spam APIs in 2024
Raymond Camden's Blog
by Raymond Camden
4d ago
I enjoy building API demos so I generally keep an eye out for interesting APIs to play with. A few weeks ago it occurred to me that I had not seen anyone talking about or sharing information about Spam APIs. I may be showing my age a bit, but it feels like spam was a much larger issue back in the early days. It was something you always heard about and worried about but not so much anymore. Much like nuclear war. I did a bit of digging and it turns out Chris Coyler had similar thoughts 4 years ago: "Spam Detection APIs". I thought I'd check out a few myself and share the results. Here, in no p ..read more
Visit website
Using PDF Content with Google Gemini
Raymond Camden's Blog
by Raymond Camden
6d ago
Back in February Google announced Gemini 1.5, their latest, most powerful language model, and while access has been open via AI Studio, API access has only been available in the past few days. I thought I'd try out the new model and specifically make use of the larger context window to do prompts on PDF documents. I discussed something similar earlier this year(("Using AI and PDF Services to Automate Document Summaries")[https://www.raymondcamden.com/2024/01/08/using-ai-and-pdf-services-to-automate-document-summaries]) which made use of Diffbot, so I thought it would be interesting to build a ..read more
Visit website
Three Cool (to me) Node.js Features
Raymond Camden's Blog
by Raymond Camden
1w ago
I've been using Node.js on the regular now for probably over a decade, but one thing I've never done well is keep up to date with its features and new additions. In general, my brain just thinks "use javascript" and that's all. The last time I really cared about what precisely was supported was when I was using fetch in client-side JavaScript and it wasn't supported natively in Node. Luckily I could just use node-fetch and be done with it. That being said, I recognize I've not done a great job of keeping track of updates to Node itself so I try to notice it when folks mention it. Over the past ..read more
Visit website
Links For You
Raymond Camden's Blog
by Raymond Camden
1w ago
Good morning. I managed to tear myself away from Assasin's Creed Valhalla a bit to get out a "Links For You" post. I was supposed to do this last week (my schedule is every two weeks), but I must have forgotten. Or just been busy. Life happens, amiright??!?! Next month will be pretty busy as well. I've got two conferences I'll be speaking at, a birthday, and just normal life stuff as well. As a reminder, if you find these posts, and this blog handy, I've got multiple ways you can show your support. With my birthday coming up, you could always visit my Amazon wishlist, or become a patron (I'd u ..read more
Visit website
Responding to HTML Changes in a Web Component
Raymond Camden's Blog
by Raymond Camden
2w ago
While driving my kids to school this morning, I had an interesting thought. Is it possible for a web component to recognize, and respond, when its inner DOM contents have changed? Turns out of course it is, and the answer isn't really depenedant on web components, but is a baked-in part of the web platform, the MutationObserver. Here's what I built as a way to test it out. The Initial Web Component # I began with a simple web component that had the following simple feature - count the number of images inside it and report. So we can start with this HTML: <img-counter> <p> ..read more
Visit website
Using Intl.RelativeTimeFormat for Localized Relative Timings
Raymond Camden's Blog
by Raymond Camden
2w ago
I've been singing the praises of the web platform's Intl object for years now, but it still continues to impress me. While I've seen it before, today I came across the RelativeTimeFormat API which looks absolutely fabulous. I played with it a bit and thought I'd share some tips. The Basics # The RelativeTimeFormat API works like so: Given a locale... Given a difference (in either a positive or negative value)... And given a unit of time, like 'hour' (or 'hours') Report the difference in the user's desired language. So for example: 3 and day, "in 3 days" -1 and day, "one day ago" 18 and hour ..read more
Visit website
Converting a Vue 2 App to Alpine.js
Raymond Camden's Blog
by Raymond Camden
3w ago
A little over two years ago I published an "idle clicker game" built in Vue.js. I called it "IdleFleet" and was heavily inspired by games like A Dark Room, where I relied on simple text graphics and game mechanics that would change as you played. In my last <Code><Br> session, I walked through the process of building a simple text game and brought up IdleFleet as an example. While playing the game to refresh my memory about what I actually built... I discovered I actually really liked it. I decided it would be good to give it some attention with new features and other updates, but ..read more
Visit website
TIL - submit() versus requestSubmit()
Raymond Camden's Blog
by Raymond Camden
3w ago
Today I learned (well, technically, a few days ago, the week has been a lot), that the web platform supports a requestSubmit method. Since the beginning of time (or the beginning of JavaScript), we've been able to submit forms like so: var myForm = document.getElementById('theform');myForm.submit(); I intentionally used getElementById there as a reminder of what we had before jQuery. Given that, why do we need another method? Two important requests. Reason the First # When using submit, any validation of form fields is completely skipped. Consider this form: <form method="post" id="theFo ..read more
Visit website

Follow Raymond Camden's Blog on FeedSpot

Continue with Google
Continue with Apple
OR