Converting Timezones on the Command Line
Convert from a foreign zone to the local zone This functionality is built-in in the date command. If the local timezone is CET and you have an appointment with someone in England (GMT): $ date -d '2020-01-16 14:00 GMT' Thu 16 Jan 2020 03:00:00 PM CET Convert from the local timezone to a foreign one If the local timezone is CET and you want to convert to EST, use a environment variable to set the foreign timezone as local for the time the command runs and apply the same trick as above:..
Shared Environment Variables for Make, Bash and Docker
It is possible to define a set of variables and share them in Make, Bash and the Docker containers that are orchestrated by docker-compose. Docker-compose can use an .env file to substitute variables in a docker-compose...
Job Control in Bash Scripts
One should be careful when considering an option like this. Sending processes to the background in a script, are you sure this is what you want? However, sometimes ducktape is the only thing that works...
Basic Caching Headers in Nginx
CSS Flexbox Examples
A very helpful visual guide to all the flexbox options in CSS: https://css-tricks.com/snippets/css/a-guide-to-flexbox/..
Http Status Codes
Wikipedia has a complete list of offical and custom HTTP status codes here: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes..
Some Git Branching Commands
Fetch that includes the removal of remote branches $ git fetch -p Delete a Remote Branch in Git $ git push --delete <remote_name> <branch_name> To delete the local branch use one of the following:..
Some IMAP Commands
curl --url "imaps://mail.server.com/Map" --user "user:password" --request "SEARCH (SEEN)" * SEARCH 1 2 3 curl --url "imaps://mail.server.com/Map" --user "user:password" --request "SEARCH (UNSEEN)" * SEARCH curl --url "imaps://mail.server.com/Map" --user "user:password" --request "FETCH 2 FULL" * 2 FETCH (FLAGS () INTERNALDATE "05-Jul-2019 12:06:39 +0200" RFC822...
Authenticating to a private registry docker login <url> But make sure to use the complete url, not just the domain. Alternatively, edit your $HOME/.docker/config.json and put your credentials there. Sources https://stackoverflow.com/questions/46418652/docker-pull-returns-denied-access-forbidden-from-private-gitlab-registry ..
List all images docker images -a Remove dangling images docker rmi -f $(docker images -f "dangling=true" -q) Remove all images docker rmi $(docker images -a -q) Remove unused volumes docker volume prune Remove all dangling data docker system prune Additionally remove also stopped containers and unused images:..