- shell
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout server.key \
function get(obj, path, def) { | |
var fullPath = path | |
.replace(/\[/g, '.') | |
.replace(/]/g, '') | |
.split('.') | |
.filter(Boolean); | |
return fullPath.every(everyFunc) ? obj : def; | |
function everyFunc(step) { |
const isNewVersion = (oldStr, newStr, contrastIdx = 0) => { | |
const oldArr = [0, 0, 0] | |
const newArr = [0, 0, 0] | |
oldArr.splice(0, oldStr.split('.').length, ...oldStr.split('.')) | |
newArr.splice(0, newStr.split('.').length, ...newStr.split('.')) | |
const oldTag = parseInt(newArr[contrastIdx], 10) | |
const newTag = parseInt(oldArr[contrastIdx], 10) | |
if (oldTag === newTag) { | |
if (contrastIdx === 2) { |
# 生成https 的ssl | |
* shell | |
``` | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ | |
-keyout server.key \ |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |