A list of things to consider for inclusion in an express
microservice generator.
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
function isTimeExpired(start, delayMs) { | |
const nowMs = new Date().getTime() | |
const stopMs = start.getTime() + delayMs | |
return nowMs > stopMs | |
} | |
async function waitMs(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)) | |
} |
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/sh | |
# colours | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
NC='\033[0m' # no colour | |
# ----------------------------------------------------- prompts | |
echo "${GREEN}Please enter your cisco credentials (the ones you normally use for http://1.1.1.1) --${NC}" | |
read -p "username: " USERNAME |
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
# docker run -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf -p 80:80 nginx:1.13.12-alpine | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 80; |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjM86FsdirFpOplXwqHhC9CuqLZtBFjzC2pUiDQnUMCUg2uShpovJIRlrnPr8UnWgEqXIiFfW4lLNa72Lqh344jl/d8lVHgHw0A7W2jeub/7K/GC0v8KNOv/Pk3Sb/qfwBNmkmM0VkHf3cXsW4cZ4RGZHXWCW8+WKvi3/lYOGfAOzTFG21QU+HLcygDyBXxXXPGL1CcBJPEGq9nxNBkzI6mxsw/IZtAGwNt4pQ3M++DWoxqB1MBcUyYZiQDsShW5HeNu2SjTMFkD79NNA2YmV27jgFxCnggEFE87wfQnXDoovDdlLwsXDSQL+cw2tENqXxq6sgGyFkt+Ime20ffbn5 |
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
for bucket in `s3cmd ls | awk {'print $3'}` | |
do | |
s3cmd del --force --recursive $bucket | |
s3cmd rb $bucket | |
done |