This file contains 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
version: '3.9' | |
services: | |
nginx: | |
image: nginx:1.20.2-alpine | |
ports: | |
- 80:80 | |
volumes: | |
- ./nginx.conf:/etc/nginx/nginx.conf:ro | |
depends_on: |
This file contains 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
/** | |
* @param {number} max the upper bound of the result | |
* @return {number} random number up to (but not including) max value [0, max) | |
*/ | |
const randomUpTo = max => Math.floor(Math.random() * max); | |
/** | |
* @param {number|undefined} prob if defined, probability (percent) of the outcome being true | |
* @return {boolean} [true|false] | |
*/ |