For not-exactly-mission-critical stuff, I just keep a secret gist and go get it with wget as part of readying a repo for further work.
you@yours:~/proj$ wget -O ${HOME}/.envvars https://gist.githubusercontent.com/yourse1f-yourorg/f6fccc2f363778e4c02593320581744a/raw/e4817535414f0dfd1c2adae21dc816d0b21a0a1f/.envvars
you@yours:~/proj$
you@yours:~/proj$ cat ${HOME}/.envvars
#!/bin/bash
#
export GITHUB_KEY="5414f0dfd1c2adae21dc816d0b21";
export MAILGUNKEY="key-7268fff364215abd5eb00ff0575528";
export LOGGLYKEY="ccc2f363778e4c0259332";
you@yours:~/proj$
you@yours:~/proj$ source ${HOME}/.envvars; # loads the three into local environment
you@yours:~/proj$
A neat trick for your settings.json
, instead of the more usual, settings.json.example
, is to source control an executable shell script file, such as, template.settings.json.sh
. You can then do :
you@yours:~/proj$ ./template.settings.json.sh > settings.json;
you@yours:~/proj$
you@yours:~/proj$ cat settings.json
{
"MAILGUN_DOMAIN": "yourpublic.work",
"MAILGUN_KEY": "key-7268fff364215abd5eb00ff0575528",
"LOGGLY_SUBDOMAIN": "yourwork",
"LOGGLY_TOKEN": "ccc2f363778e4c0259332",
"public": {
"APP_META": {
"Name": "Our App",
"Privacy": "If you ain't paying for the product, you ARE the product.",
}
}
}
you@yours:~/proj$
The template would look like this :
you@yours:~/proj$ cat template.settings.json.sh
#!/bin/bash
#
cat <<EOF
{
"MAILGUN_DOMAIN": "yourpublic.work",
"MAILGUN_KEY": "${MAILGUNKEY}",
"LOGGLY_SUBDOMAIN": "yourwork",
"LOGGLY_TOKEN": "${LOGGLYKEY}",
"public": {
"APP_META": {
"Name": "Our App",
"Privacy": "If you ain't paying for the product, you ARE the product.",
}
}
}
EOF
you@yours:~/proj$
and you’d make it executable with :
you@yours:~/proj$ chmod +x ./template.settings.json.sh;
you@yours:~/proj$
Putting that all together … three lines and you’re all set up :
you@yours:~/proj$ wget -O ${HOME}/.envvars https://gist.githubusercontent.com/yourse1f-yourorg/f6fccc2f363778e4c02593320581744a/raw/e4817535414f0dfd1c2adae21dc816d0b21a0a1f/.envvars
you@yours:~/proj$ source ${HOME}/.envvars; # loads the three into local environment
you@yours:~/proj$ ./template.settings.json.sh > settings.json;