Node EADDRINUSE (Address Already in Use) Error

Every once in a while my Macbook Pro freaks out and a process goes rogue.  This oftentimes happens when I’m working on the excellent debugger.html project; I attempt to start the server side of the debugger and suddenly I’m hit with an error that resembles the following, leading to the process not starting from that […]
The post Node EADDRINUSE (Address Already in Use) Error appeared first on David Walsh Blog.

Link: https://davidwalsh.name/node-eaddrinuse

Split Files Into Smaller Files

As fast as internet connections have gotten over the years, it seems the size of files we want to share has grown faster.  Whether it’s archive (ZIP), video, or any other host of potentially large file types, it’s still tricky to put these large files somewhere to download since many storage providers have file size […]
The post Split Files Into Smaller Files appeared first on David Walsh Blog.

Link: https://davidwalsh.name/split-files

Show git Branch from Command Line

Whether it’s simply submitting pull requests or being snobby enough to use vim as a text editor, web developers and designers spend an awful lot of time working from command line.  If you do work with git, you know it’s important to keep track of your branches, especially when it comes to knowing which branch you’re […]
The post Show git Branch from Command Line appeared first on David Walsh Blog.

Link: https://davidwalsh.name/show-git-branch-command-line

Create a Waveform Image with ffmpeg

Waveform images have a variety of uses and I’ve started seeing waveform images overlaying at the bottom of videos.  That type of feature seems useful if you want to see identify music in a video or specific spaces in a video which feature action.  If you’re creating an audio-centric app, you may have a dozen […]
The post Create a Waveform Image with ffmpeg appeared first on David Walsh Blog.

Link: https://davidwalsh.name/waveform

Shell: Create a Comma Separated String

I recently needed to generate a string with comma separated values, based on iterating a range of numbers (e.g. we should get the following output where n = 3).
foo-0,foo-1,foo-2
I only had Shell available to me so I couldn’t shell out into Python or Ruby, for example. That means it’s Bash scripting time!

Link: https://dzone.com/articles/shell-create-a-comma-separated-string?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev

Create Aliases in Bash

Every developer likes a shortcut — they’re what make us more efficient in our work.  Of course there are good shortcuts and bad shortcuts (lazy coding, lack of security review, etc.), but let’s stick with the positive and talk about a good shortcut:  bash aliases. We all have commands that we execute regularly but aren’t able to remember […]
The post Create Aliases in Bash appeared first on David Walsh Blog.

Link: https://davidwalsh.name/alias-bash

Address Validation API with streetlayer

There is so much of our web and eCommerce that consumers take for granted: payment types and validation, exchange rates, etc.  One of the aspects of eCommerce that should be a given, from both a developer and consumer perspective, is address handling.  We’d like to think the consumer enters their address correctly but the risk is if the don’t […]
The post Address Validation API with streetlayer appeared first on David Walsh Blog.

Link: https://davidwalsh.name/streetlayer-address-api

Track Empty Directories with git

There are times when you’d like to track an empty directory within git but there’s a problem: git wont allow you to add a directory that doesn’t have a file in it.  The easy solution is putting an empty stub file within the directory, and the industry standard for that stub file name is .gitkeep. You […]
The post Track Empty Directories with git appeared first on David Walsh Blog.

Link: https://davidwalsh.name/git-empty-directory

Get Keychain Passwords from Command Line

One of my favorite command line utilities is Guillermo Rauch’s wifi-password, a utility that allows you to get a saved password for the wifi network you’re presently connected to (to share with colleagues or creeper in the cafe you’re in).  The idea of being able to get a password from command line is super useful, especially […]
The post Get Keychain Passwords from Command Line appeared first on David Walsh Blog.

Link: https://davidwalsh.name/keychain-command-line

Get Python Requirements Package Hashes

Python’s (pip’s) requirements.txt file is the equivalent to package.json in the JavaScript / Node.js world.  This requirements.txt file isn’t as pretty as package.json but it not only defines a version but goes a step further, providing a sha hash to compare against to ensure package integrity: Flask==0.12.1 \ –hash=sha256:6c3130c8927109a08225993e4e503de4ac4f2678678ae211b33b519c622a7242 Jinja2==2.9.6 \ –hash=sha256:2231bace0dfd8d2bf1e5d7e41239c06c9e0ded46e70cc1094a0aa64b0afeb054 MarkupSafe==1.0 \ –hash=sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665 …. Coming from the JavaScript / package.json world, you […]
The post Get Python Requirements Package Hashes appeared first on David Walsh Blog.

Link: https://davidwalsh.name/hashin