- HTTP 形式:
git clone https://github.com/owner/git.git
- SSH 形式:
git clone git@github.com:owner/git.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get(obj, path, def) { | |
var fullPath = path | |
.replace(/\[/g, '.') | |
.replace(/]/g, '') | |
.split('.') | |
.filter(Boolean); | |
return fullPath.every(everyFunc) ? obj : def; | |
function everyFunc(step) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 生成https 的ssl | |
* shell | |
``` | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ | |
-keyout server.key \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |