An Alpine.js Template for Glitch / / No Comments I discovered Glitch a few months ago, and while I haven’t used it a lot since then, the more I do, the more I really dig it. When working on my blog post yesterday, I shared the demo as a Glitch project, you can see it here if you would like. While setting up the project, I fumbled a bit with the right order of script tags, which was entirely my fault, but knowing my memory I wanted to note what worked for me, and share it with others. Let’s start with the code first. Raymond Camden… more → Posted in: JavaScript Tagged with: Alpine.js, Glitch, Template
Building an API to List Cloudinary Images in a Folder / / No Comments I was preparing to work on a Cloudinary and Apline post when I realized I needed something before I could build that demo – a list of images in a Cloudinary folder. While this is directly supported by their SDKs and REST APIs, I needed something that could be used in a public-facing web application. So with that in mind, I turned to Pipedream to build a serverless endpoint. Here’s how I did it. Raymond Camden… more → Posted in: JavaScript Tagged with: building, Cloudinary, Folder, images, List
Integrating Cloudinary into Eleventy / / No Comments I’ve had on my "to-do" list for months now to take a look at Cloudinary and their media APIs. I got some time this week to play around with it and I wanted to share my experience. TLDR – it’s freaking incredibly well done and surprisingly powerful. Here’s what I found. Raymond Camden… more → Posted in: JavaScript Tagged with: Cloudinary, Eleventy, Integrating, into
Determine Default App for File Type from Command Line / / No Comments One quality of life improvement any developer can make for themselves is ensuring different file types open in the app they’re most proficient in. If you know me, you know I prefer accomplishing as much as possible from the command line. The duti utility allows users to determine default file type from command line. The duti utility allows developers to query which app is the default for different file types. You can install duti with brew: brew install duti Once you have duti available, you can check on the default app for file type with the following command: ~ duti -x md Xcode.app /Applications/Xcode.app com.apple.dt.Xcode You can set the default app by using its package: duti... more → Posted in: JavaScript Tagged with: Command, default, determine, file, from, line, type
Skip or Only Run a Test with JavaScript Mocha / / No Comments Whenever I start to feel anxiety about a big change I’m making, I start writing more unit tests. I’ll write down my fear and then write a test that attacks, and eventually relaxes, that fear. There are two actions that I’ve been frequently using with test writing: skipping all but one test or single tests. Skip a Test Oftentimes I will create tests with empty bodies so that I don’t forget to write them. To skip a test which is incomplete or known to fail, you can use xit: xit('does the thing I want', () ={ }); Once the test is complete or ready to be applied, you can change xit back to it. Run a Single Test To run only a single test with the Mocha test framework,... more → Posted in: JavaScript Tagged with: JavaScript, Mocha, only, Skip, test
Building a Placeholder Web Component with No External Dependencies / / No Comments As my readers can tell, I’m on something of a web component kick, and while I’m enjoying building silly examples, today I wanted to share one I thought might actually be useful – a placeholder component that doesn’t use any external services. Raymond Camden… more → Posted in: JavaScript Tagged with: building, Component, Dependencies, External, Placeholder
A PDF Embed Web Component / / No Comments I’m still pretty new to web components (see my post back in May, My First Web Component), but I’ve been playing with them, and other libraries that wrap them, off and on. Recently I decided to revisit something I had tried at the time I first played with the technology, a wrapper for Adobe’s PDF Embed library. Raymond Camden… more → Posted in: JavaScript Tagged with: Component, EMbed
Using the Adobe PDF EMbed API with Vue 3 / / No Comments A long time ago, ok, February of last year, I posted about using the Adobe PDF Embed library with Vue.js: Using the PDF Embed API with Vue.js. The main issue with our Embed library and libraries like Vue is a "chicken and egg" issue. Basically, our docs tell you to add an event listener for our library to load, but it’s possible that the library has loaded before you add the event listener. Raymond Camden… more → Posted in: JavaScript Tagged with: Adobe, EMbed, using