Nick Janetakis Avatar

Nick Janetakis

Nick Janetakis

Using `envsubst` to merge environment variables into config files

Nick told us about this on our modern Unix tooling episode, but I thought I’d link up his excellent writeup/video on the subject for those who had a hard time following with audio only.

Let’s say you have an nginx or Kubernetes config file which doesn’t support templating out of the box and you want to dynamically create config files based on 1 or more environment variables. This is what envsubst lets you do.

Nick Janetakis

80 characters per line is a standard worth sticking to even today

Nick Janetakis takes on the most common argument against 80 chars per line:

It’s easy to think “wtf, I have a massive monitor, why should I limit myself to a standard that was created for punch cards in 1928 or terminals from the late 1970s?”

If that’s what you’re thinking, definitely give this a read. He makes a strong case. One thing is for sure, you don’t want to end up like this guy… 😆

0:00 / 0:00