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 alert = () => { | |
const VmConstructor = Vue.extend({ | |
template: ` | |
<div> | |
<button @click="$emit('yes')">yes</button> | |
<button @click="$emit('no')">no</button> | |
</div> | |
` | |
}) | |
const instance = getAnInstance(VmConstructor) |
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
// 2018.5.11更新: 减少了swap | |
function qSort(compare) { | |
var swap = (p1, p2) => { | |
var tmp = this[p1]; | |
this[p1] = this[p2]; | |
this[p2] = tmp; | |
} | |
var sortRange = (start, end) => { | |
var midValue = this[start]; | |
var p1 = start + 1, p2 = end - 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
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
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
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: | |
cd /etc/yum.repos.d/ | |
vim nginx.repo | |
填写如下内容: | |
[nginx] | |
name=nginx repo |
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
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |