David Walsh Blog
Serve a Directory with Ruby
![Serve a Directory with Ruby]()
![Product Personalization Images with Cloudinary]()
Product Personalization Images with Cloudinary
A few weeks ago I experimented with using Cloudinary in eCommerce sites because dynamic imagery is a massive part of eCommerce needs. Media-heavy websites usually employ powerful, expensive image-manipulation software so that they can create images on demand.  Little do they know that a service like Cloudinary...
![Prevent JavaScript Hotlinking with .htaccess]()
Prevent JavaScript Hotlinking with .htaccess
Almost a decade (!) ago I wrote a post about preventing image hotlinking. Â We all have the right to protect imagery hosted on our domain because it can slow our site down tremendously. Â I love that post because it shows you how to replace the...
Digital Signatures with the ​HelloSign API
We're living in a world with loads of digital capabilities yet somehow any time I need to sign anything for legal purposes, I'm sent paper to print out, sign, scan, and send back.  I don't own a printer so I usually just find a "signature"...
![Copy to Clipboard from Command Line]()
Copy to Clipboard from Command Line
If you've ever been debugging with a fellow developer, you'll hear "OK, execute that and let me know what it says".  In this case, you can either manually copy the output and instant message the text over to them, or you can write the output to file...
![JPEG Compression with Guetzli]()
JPEG Compression with Guetzli
A little while ago Google released its Guetzli JPEG encoder, which claims a 20-30% improvement in file size over libjpeg. Being intrigued, I decided to give it a go. My tool of choice for optimizing JPEGs has long been jpeg-recompress, one of the...
![Format Video Length in HH:MM:SS from Command Line]()
Format Video Length in HH:MM:SS from Command Line
In my experimentation with audio and video manipulation, I've found that most tools prefer to handle time in HH:MM:SS (hour:minute:second) format.  I always presumed that using seconds would be easier but I'm barely a novice media tool user, much less a tool creator. When I wrote the Create Short...
![Scrape Images with wget]()
Scrape Images with wget
The desire to download all images or video on the page has been around since the beginning of the internet. Â Twenty years ago I would accomplish this task with a python script I downloaded. Â I then moved on to browser extensions for this task, then started...
![Using Cloudinary for eCommerce]()
Using Cloudinary for eCommerce
Nothing improves sales on the web than imagery and video.  You can describe an item a dozen ways but one picture can suck the user right in, multiple photos (including a nice zoom feature) can clinch the sale.  What does this mean?  It's important to provide users...
![Giveaway: OSCON Austin, May 8-11!]()
Giveaway: OSCON Austin, May 8-11!
O'Reilly's amazing OSCON is coming to Austin, Texas from May 8-11th, 2017.  OSCON celebrates open source, the community, and the driving forces for open source software on the web.  We've all used open source software and many of us have contributed to those open source...
Popular Features
![Being a Dev Dad]()
Being a Dev Dad
I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...
![JavaScript Promise API]()
JavaScript Promise API
While synchronous code is easier to follow and debug, async is generally better for performance and flexibility. Why "hold up the show" when you can trigger numerous requests at once and then handle them when each is ready?  Promises are becoming a big part of the JavaScript world...
![Chris Coyier’s Favorite CodePen Demos II]()
Chris Coyier’s Favorite CodePen Demos II
Hey everyone! Before we get started, I just want to say it's damn hard to pick this few favorites on CodePen. Not because, as a co-founder of CodePen, I feel like a dad picking which kid he likes best (RUDE). But because there is just so...
![7 Essential JavaScript Functions]()
7 Essential JavaScript Functions
I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like
addEventListenerandattachEvent. Â Times have changed but there are still a few functions each developer should...![I’m an Impostor]()
I’m an Impostor
This is the hardest thing I've ever had to write, much less admit to myself. Â I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life. Â All of those feelings were very...










