Quick Go Test Cycle With Reflex
While you are working on some piece of code, it is nice to have some feedback about whether you broke or fixed something by running the relevant unit tests. To automate this I usually have a terminal window open with the following command:..
Docker Ipchains Error
It might be the way I’ve setup my Docker, but for some reason, but I get the following error on a regular basis when starting things up with docker-compose: $ docker-compose up Creating network "sis_back-tier" with driver "bridge" ERROR: Failed to program FILTER chain: iptables failed: iptables --wait -I FORWARD -o br-90bd8b86bb28 -j DOCKE R: iptables v1...
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...