The set lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefailis short for:
set -e
set -u
Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.
Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).
It should look something like the content below; call it my-site.conf or something like that.
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ################################################################# | |
| ## AUTHOR: allan parsons (allan.parsons@gmail.com) | |
| ## DATE: 2013-July-24 | |
| ## PURPOSE: | |
| ## We currently have multiple redis processes running on a | |
| ## single box, and we're wanting to backup all of the rdb | |
| ## files and aof files to S3 on a semi-regular basis. | |
| ## This loops through all the configs to find the appropriate | |
| ## AOF, RDB, and instance names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| rediscli=`which redis-cli` | |
| s3cmd=`which s3cmd` | |
| lsave=`$rediscli lastsave` | |
| echo "LASTSAVE $lsave" | |
| saved="`$rediscli config get dir | xargs | cut -d ' ' -f 2`/`$rediscli config get dbfilename | xargs | cut -d ' ' -f 2`" | |
| $rediscli bgsave | |
| while [ $lsave -eq `$rediscli lastsave` ]; do |