Ps: The current setup was done on 01-04-19
Project Dependency Versions at the time 👇
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"typescript": "^3.2.2"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",| /* Helper buddy for removing async/await try/catch litter 🗑 */ | |
| function O_o(promise) { | |
| return promise.then(data => { | |
| if (data instanceof Error) return [data] | |
| return [null, data] | |
| }).catch(err => [err]) | |
| } | |
| /* Look ma, no try/catch */ | |
| async function usageExample(params) { |
Ps: The current setup was done on 01-04-19
Project Dependency Versions at the time 👇
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"typescript": "^3.2.2"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",| import json | |
| def writeToJSONFile(path, fileName, data): | |
| filePathNameWExt = './' + path + '/' + fileName + '.json' | |
| with open(filePathNameWExt, 'w') as fp: | |
| json.dump(data, fp) | |
| # Example | |
| data = {} |
| // Usage: | |
| // | |
| // function loader() { | |
| // return new Promise((resolve) => { | |
| // if (process.env.LAZY_LOAD) { | |
| // require.ensure([], (require) => { | |
| // resolve(require('./SomeComponent').default); | |
| // }); | |
| // } | |
| // }); |
| #!/bin/bash | |
| # call this script with an email address (valid or not). | |
| # like: | |
| # ./makecert.sh joe@random.com | |
| mkdir certs | |
| rm certs/* | |
| echo "make server cert" | |
| openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" | |
| echo "make client cert" | |
| openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" |
| # Create a container from the mongo image, | |
| # run is as a daemon (-d), expose the port 27017 (-p), | |
| # set it to auto start (--restart) | |
| # and with mongo authentication (--auth) | |
| # Image used is https://hub.docker.com/_/mongo/ | |
| docker pull mongo | |
| docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
| # Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
| # add a root user |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Title</title> | |
| <link href="stylesheets/main.css" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <header> | |
| <hgroup> |
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |