mogrify is part of the ImageMagick suite of tools. It’s simple, powerful, and easy to use.
The Raspberry Pi is a great device for dev side-projects, such as a home media station, an IoT device, or a local server. Here are some of my go-to configurations when setting one up.
There are many methods to communicating between processes. Many methods work best when only using a single programming language, while others require custom packets and parsing.
Simplicity is key and Redis is an efficient solution. Redis is an open-source in-memory database project implementing a distributed, in-memory key-value store.
Package management is hard. Sometimes in Python package development, your local (development) environment may behave a little differently than a deployment target. Below is a simple method I use to replicate a clean environment and test Python package installs and tests.
A simple bash for-loop for convert many images at once.
ls -l | wc -l ls: list directory contents -l: list in long format wc: word, line, character, and byte count -l: the number of lines is written to the standard output This command counts the number of listed lines. I find this most useful when I want to quickly see how many logs or records have been generated by a process.
detex my-document.tex | wc -w detex: a filter to strip TeX commands from a .tex file wc: word, line, character, and byte count -w: The number of words in each input file is written to the standard output
git submodule foreach --recursive git reset --hard This command recursively resets all submodules in a git project. This is especially useful for projects with submodules (and maybe even submodules within submodules) when you want to reset your working copy to a completely clean state.
python -m http.server 8000 This will serve index.html in the current working directory.