Skip to content

Instantly share code, notes, and snippets.

View magicianShiro's full-sized avatar
🏠
Working from home

NAVI magicianShiro

🏠
Working from home
View GitHub Profile
@fimars
fimars / alert.js
Created November 27, 2017 09:42
A Vue Alert Demo
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)
// 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;
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
@ifels
ifels / centos6.5_nginx
Last active September 7, 2023 01:57
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* 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 = {