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
基础的概念,索引,工作树, | |
* git revert (直接丢掉修改) | |
* 直接回退到某个commit版本 | |
* git reset (修改退回到工作区) | |
* 回退到某个版本,但是前面的修改会退回到工作区 | |
* 还有很多的选项,soft,mixed,hard,merge,keep | |
* soft,回退为已经added状态,绿色 | |
* mixed,回退为未added状态,红色, |
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
apt-get 安装vim失败 https://unix.stackexchange.com/questions/336392/e-unable-to-locate-package-vim-on-debian-jessie-simplified-docker-container |
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
ps aux | grep node // 查询node类应用,以及看到pid | |
lsof -aPi -p $pid // 通过pid查询占用的端口 | |
lsof -i:$port // 通过端口查询pid |
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 capitalizeFirstLetter(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} |
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
// 匹配正则中的params | |
let reg = /(appId=).*?(&|#|$)/ | |
window.location.href.replace(reg, '$1lls$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://zhuanlan.zhihu.com/p/27307626 | |
// 二叉树遍历,有深度优先和广度优先。有递归算法和非递归算法 | |
var nodes = { | |
node: 6, | |
left: { | |
node: 5, | |
left: { | |
node: 4 | |
}, | |
right: { |
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
Array.prototype._map = function(fn, bindThis) { | |
bindThis = bindThis || null; | |
return this.reduce(function(total, curr, currIndex, arr){ | |
// console.log(total) | |
total.push(fn.call(bindThis, curr, currIndex, arr)); | |
return total; | |
}, []) | |
}; | |
Array.prototype._filter = function(fn, bindThis) { |
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
<template v-if="type === 'A'"> | |
</template> | |
<template v-else> | |
</template> |
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 getClosestInstanceFromNode(node){ | |
} |
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
Array.isArray() | |
// 类检测 | |
mySprite instanceof Sprite; | |
// 基础类型检测? |
NewerOlder