openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| { | |
| "arrowParens": "avoid", | |
| "bracketSpacing": true, | |
| "htmlWhitespaceSensitivity": "css", | |
| "insertPragma": false, | |
| "jsxBracketSameLine": false, | |
| "jsxSingleQuote": false, | |
| "printWidth": 100, | |
| "proseWrap": "always", | |
| "quoteProps": "as-needed", |
| import request from 'request'; | |
| async function requested(params: any) { | |
| let promise = await new Promise<any>((resolve, reject) => { | |
| request(params, (err: any, res: any, body: any) => { | |
| if (err || res.statusCode != 200) | |
| reject(err) | |
| else | |
| resolve(body); | |
| }) |
| function isPrime(n) { | |
| let counter = 0; | |
| if (n == 2) return true; | |
| if (n % 2 == 0 || n == 1) return false; | |
| for (let i = 1; i <= n / 2; i += 2) { | |
| if (n % i == 0) | |
| counter++; | |
| if (counter == 2) | |
| break; | |
| } |
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
| openssl genrsa -out ca.key 4096 | |
| openssl req -new -x509 -days 1826 -key ca.key -out ca.crt | |
| openssl genrsa -out ia.key 4096 | |
| openssl req -new -key ia.key -out ia.csr | |
| openssl x509 -req -days 730 -in ia.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out ia.crt | |
| openssl pkcs12 -export -out ia.p12 -inkey ia.key -in ia.crt -chain -CAfile ca.crt | |
| source : https://goo.gl/m2aW9p |
| { | |
| "editor.formatOnSave": true, | |
| "files.exclude": { | |
| "*.js": true, | |
| "*.js.map": true, | |
| "ServerLocal": true | |
| } | |
| } |
| To undo Commits on github | |
| 1. Uncommit the commits using using VS Code | |
| 2. use this Cli Command 'git push origin +branchName' |
| { | |
| "configurations": [ | |
| { | |
| "name": "Win32", | |
| "includePath": [ | |
| "${workspaceFolder}/**", | |
| "C:/MinGW/**" | |
| ], | |
| "defines": [ | |
| "_DEBUG", |