One-liners: Stopping all your docker containers

Let’s say you have multiple docker projects on your laptop and in the course of a day you bounce around between them. It’s easy to forget which ones have been shut down and which haven’t. If you’re using docker-compose this could mean several containers are running and eating your battery. Here’s a simple one-liner to shut them all down.

docker ps -q | xargs docker stop

SVN Tips That Saved My Ass Once

Ever need to deploy a version controlled site that overwrites existing files? This is common when taking a site from un-versioned to versioned.

First checkout the files using the force option.

svn checkout --force https://vanwinkle.somesvnserver.com/trunk/ ./

This will force the checkout process to complete, but your old files will not really be overwritten. Instead they will be considered modified version of the corresponding file in the repo. So to complete the process you need to do:

svn revert -R ./

This tells subversion to “revert” the files in the existing directory to the versioned state. The -R tells it to do this recursively and the ./ tells it to start in the current directory.