Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →
We'll go over deleting 1 or more lines that match a regex as well as deleting specific lines by number reference.
We'll go over creating a script to read in JSON from a file or your clipboard complete with multi-line syntax highlighting.
The use case we'll go over is performing a major database upgrade for a large application that's running in production.
I use it multiple times a day and it never fails me. If you're looking for a secure offline password manager, look no further.
It's important to differentiate these to protect your app from not starting up if a required env var is missing.
Here's a few things I keep in mind when trying to solve problems that require a decent amount of thinking or I don't know where to start.
They're handy for adding common behavior to admin pages, versioned APIs, etc. or grouping up related blueprints.
We'll go over how to determine this and cover a use case of when you might want to create a script that handles both.
This can be handy to delete temp files that your script creates or to always write a log file out if the script works or fails.
You may want to do this before recording videos, giving presentations at work, demoing something for clients or live streaming.
The script handles calling another script with an optional position argument and 0 or more command line flags.
This can help detect how long a server has been up or when you may have powered it off. We'll track reboots too.
This can save you from writing a file to a temporary directory and then moving it after using mkdir.
We'll go over examples with echo, how to use it for creating files and making multiple curl requests. It's a flexible feature!
Here's a few ways to output multiples files so you can skim which file has which content.
Aliases and shell functions serve a similar purpose, but they don't need to be kept in the same file.
Sometimes you want to experiment and revert the changes you've made to their last known good state or dispose of files.
We'll go over using short flags, long flags, flags with and without values and required positional arguments.
There's a couple of ways to split strings into an array with a 1 character or multi-character delimiter.
Provide a file along with a start / end time and ffmpeg will do the rest. We'll also make a tiny wrapper script to make it easier to use.
Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.