This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
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.
| def calculate_aspect(width: int, height: int) -> str: | |
| def gcd(a, b): | |
| """The GCD (greatest common divisor) is the highest number that evenly divides both width and height.""" | |
| return a if b == 0 else gcd(b, a % b) | |
| r = gcd(width, height) | |
| x = int(width / r) | |
| y = int(height / r) | |
| return f"{x}:{y}" |
If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:
$ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)$ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)$ git config --global alias.logs "log --show-signature" (now available as $ git logs)$ git config --global alias.cis "commit -S" (optional if global signing is false)$ echo "Some content" >> example.txt$ git add example.txt$ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)| <!doctype html> | |
| <!-- Adapted from https://gist.github.com/tfausak/2222823 --> | |
| <html> | |
| <head> | |
| <title>Mobile-ready web app</title> | |
| <!-- CONFIGURATION --> |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] | |
| [email protected] |