From 9fd58e4130ef1aa34d5cdbb82016ae135cdd1d4b Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Tue, 30 Apr 2019 17:49:02 -0400 Subject: [PATCH 1/2] add systemd service --- ubuntu/system_service.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ubuntu/system_service.md diff --git a/ubuntu/system_service.md b/ubuntu/system_service.md new file mode 100644 index 0000000..9ce0bac --- /dev/null +++ b/ubuntu/system_service.md @@ -0,0 +1,21 @@ +`//etc/systemd/system/filename.service` + +``` +[Unit] +Description=forecast_api +After=network.target + +[Service] +ExecStart=/usr/bin/node //opt/forecast_api/index.js +Restart=always +User=fc_api +Environemnt=NODE_ENV=production +WorkingDirectory=//opt/forecast_api + +[Install] +WantedBy=multi-user.target +``` + +`systemctl enable forecast.api` + +`systemctl start forecast_api.service` \ No newline at end of file From ac023916ba3aa86906c15d86112e74db7f12ccac Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Wed, 25 Sep 2019 11:02:25 -0400 Subject: [PATCH 2/2] updates --- jupyter/setup.md | 14 ++++++++++++++ nodejs/express.md | 21 ++++++++++++++++++++- nodejs/new_proj.md | 0 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 jupyter/setup.md create mode 100644 nodejs/new_proj.md diff --git a/jupyter/setup.md b/jupyter/setup.md new file mode 100644 index 0000000..09608e4 --- /dev/null +++ b/jupyter/setup.md @@ -0,0 +1,14 @@ + +install R kernel for jupyter to use +* `sudo R` +* `install.packages('IRkernel')` +* `IRkernel::installspec()` + +run on network: +`jupyter notebook --ip 10.0.10.15 --port 8888` + + +basic packages: +* ggplot2, plyr, ggExtra, scales + + diff --git a/nodejs/express.md b/nodejs/express.md index 9c98b94..b23159c 100644 --- a/nodejs/express.md +++ b/nodejs/express.md @@ -6,4 +6,23 @@ openssl genrsa -out key.pem openssl req -new -key key.pem -out csr.pem openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem rm csr.pem -``` \ No newline at end of file +``` + + +##Chrome stops accepting self-signed certs needs mod + +https://stackoverflow.com/questions/43665243/invalid-self-signed-ssl-cert-subject-alternative-name-missing + +1. set a file v3.ext +``` +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = %%DOMAIN%% +``` + +2. openssl req -new -key key.pem -out csr.pem -sha256 -extfile v3.ext + diff --git a/nodejs/new_proj.md b/nodejs/new_proj.md new file mode 100644 index 0000000..e69de29