Shell Tutorials
Serve a Directory with Ruby
Quickly serving a directory using PHP, Node.js, or Python allows for quick testing with as little hassle as possible. Imagine having to stand up apache or another server just to serve a directory -- gross! Since I had touched the three important languages, I looked to...
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...
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
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...
Allow HTTP Push with Mercurial Server
I have always loved git but my present work at Mozilla requires me to use mercurial. If you weren't already aware, Firefox code is managed through mercurial! I was recently tasked with standing up a mercurial server within a docker container and ran into an issue: mercurial rejected pushes...
Create Short Preview from Video
Displaying a preview image before loading a video is common practice with web media these days; oftentimes that image preview is the video's first frame or an important frame from the video. If you've visited an adult site recently (ahem), you will have noticed that not only do you get a preview image...
Normalize a Directory of mp3s
Back in the early days of Napster, Kazaa, eMule, and other file sharing networks, I would download as many apps, movies, game, and movies as possible. My illegal downloading was out of control; I would get DMCA notices from my ISP for apps and games I had...
ding!
I've been working with beefy virtual machines, docker containers, and build processes lately. Believe it or not, working on projects aimed at making Mozilla developers more productive can mean executing code that can take anywhere from a minute to an hour, which in itself can hit how productive I can...
Get and Remove EXIF Data from Photos
If you've ever worked for an agency or a small web shop, I'd be willing to bet you've coded a fair amount of photo galleries. You've probably also uploaded photos to social media, sent photos to friends and family, and so on. Photos seem fairly innocent but, as is the...
Modify Video Speed with ffmpeg
I watch a lot of sports and recently I've become fascinated with some of the methodologies they use to illustrate events within the game. I don't have their advanced TV software or hardware, of course, but I do have a love for ffmpeg, which allows me to do...