app3.js:
function configApp() {
// todo configuration
}
sudo apt install -y jq # sudo yum install -y jq
apex=google-moogle.com
hostedZoneIdRaw=`aws route53 list-hosted-zones-by-name --dns-name $apex. --max-item 1 | jq '.HostedZones[0].Id'`
hostedZoneId=`expr substr $hostedZoneIdRaw 14 14`
<html> | |
<head> | |
<title>Gen-map</title> | |
</head> | |
<body> | |
<div style="float: left"> | |
<h1 id="title">Formation: </h1> | |
<canvas id="myCanvas" width="300" height="100"></canvas> | |
<br> |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
// passthru all nested 'n' props of 'o', and sum their values | |
function deepSum(o,n) { | |
var c=0; | |
if(_.isObject(o)){_.each(_.keys(o||{}), k => { c+= k===n ? parseInt(o[n])||0 : deepSum(o[k],n);});} | |
return c; | |
} | |
var item = { | |
doc_count: 2, | |
val: { |
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |