Generate KEY and CSR:
openssl req -new -newkey rsa:2048 -nodes -keyout DOMAIN.key -out DOMAIN.csr
Echo the KEY in PEM format:
openssl rsa -in DOMAIN.key -outform PEM
Echo the CRT in PEM format:
| """ | |
| Settings for root logger. | |
| Log messages will be printed to console and also to log file (rotated, with | |
| specified size). All log messages from used libraries will be also handled. | |
| Three approaches for defining logging settings are used: | |
| 1. using logging classes directly (py25+, py30+) | |
| 2. using fileConfig (py26+, py30+) | |
| 3. using dictConfig (py27+, py32+) | |
| Choose any variant as you like, but keep in mind python versions, that |
| # This number should be, at maximum, the number of CPU cores on your system. | |
| # (since nginx doesn't benefit from more than one worker per CPU.) | |
| worker_processes 8; | |
| # Determines how many clients will be served by each worker process. | |
| # (Max clients = worker_connections * worker_processes) | |
| # "Max clients" is also limited by the number of socket connections available on the system (~64k) | |
| # run ss -s and u'll see a timewait param | |
| # The reason for TIMED_WAIT is to handle the case of packets arriving after the socket is closed. |
Generate KEY and CSR:
openssl req -new -newkey rsa:2048 -nodes -keyout DOMAIN.key -out DOMAIN.csr
Echo the KEY in PEM format:
openssl rsa -in DOMAIN.key -outform PEM
Echo the CRT in PEM format:
| javascript:(function(){ | |
| // avoid the bookmarklet activating more than once | |
| if (window.MyNamespace) { | |
| return; | |
| } | |
| window.MyNamespace = { }; | |
| var version = 1, | |
| script = document.createElement('script'); |
| #!/bin/sh | |
| # Setup encrypted disk image | |
| # For Ubuntu 14.04 LTS | |
| CRYPTFS_ROOT=/cryptfs | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install cryptsetup |
| /** | |
| * This code is licensed under the terms of the MIT license | |
| * | |
| * Deep diff between two object, using lodash | |
| * @param {Object} object Object compared | |
| * @param {Object} base Object to compare with | |
| * @return {Object} Return a new object who represent the diff | |
| */ | |
| function difference(object, base) { | |
| function changes(object, base) { |
This boot script will load module components on app initialization. Stick this file in server/boot. Components are looked for in the directory common/models/model-name. The script will load recursively any script from that directory, passing it the Model handle as a parameter (just like model.js loads). Conveniently, since this is occuring during the boot phase, those model scripts will execute at a later phase than model.js, meaning PersistedModel is already initialized and all peer model handles are already usable. Note - it's necessary for you to still maintain a model.js file for Loopback to load the model at all.
| # find the new device | |
| lsusb -t | |
| > Port 3: Dev 20, If 1, Class=Chip/SmartCard | |
| # device number from lsusb "Dev" | |
| lsusb -s 20 | |
| > Bus 001 Device 020: ID 32a3:3201 |
| [ | |
| { | |
| "type": "node", | |
| "request": "attach", | |
| "port": 9229, | |
| "sourceMaps": true, | |
| "name": "Attach 9229", | |
| "cwd": "${workspaceRoot}", | |
| "address": "localhost", | |
| "localRoot": "${workspaceFolder}", |