- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo nano ~/.bash_profile
- Add
export PATH=/path/to/depot_tools:"$PATH"
(it's important that depot_tools comes first here)
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
let lastValue = input.value; | |
input.value = value; | |
let event = new Event ('input', {bubbles: true}); | |
// hack React15 | |
event.simulated = true; | |
// hack React16 内部定义了descriptor拦截value,此处重置状态 | |
let tracker = input._valueTracker; | |
if (tracker) { | |
tracker.setValue (lastValue); | |
} |
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 https = require('https') | |
const options = { | |
hostname: 'flaviocopes.com', | |
port: 443, | |
path: '/todos', | |
method: 'GET' | |
} | |
const req = https.request(options, (res) => { | |
console.log(`statusCode: ${res.statusCode}`) |
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 diff --name-only --diff-filter=U | |
``` | |
https://stackoverflow.com/questions/3065650/whats-the-simplest-way-to-get-a-list-of-conflicted-files |
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
``` | |
/* Child.js */ | |
import React from 'react' | |
import withStyles from 'isomorphic-style-loader/lib/withStyles' | |
import s from './Child.css' | |
class Child extends React.Component { | |
componentDidMount() { | |
this.props.onRef(this) | |
} |
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
div content editor able waring | |
https://discuss.reactjs.org/t/setting-text-to-contenteditable-element-issues-warning/891/7 |
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://github.com/ant-design/ant-design/issues/7927# | |
// https://github.com/ant-design/ant-motion/issues/44 | |
config = rewireLess.withLoaderOptions({ | |
javascriptEnabled: true | |
})(config, env); |
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://github.com/timarney/react-app-rewired/issues/116 | |
const path = require("path"); | |
const { compose, getLoader, injectBabelPlugin } = require("react-app-rewired"); | |
const rewireLessModules = (prefix = "", lessOptions = {}) => { | |
const cloneDeep = require("lodash/clonedeep"); | |
const ruleChildren = loader => |
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://www.ibm.com/developerworks/cn/linux/l-cn-vimcolumn/index.html | |
技巧:Vim 的纵向编辑模式 | |
## 复制多行 | |
shit v,yy,p |
NewerOlder