Skip to content

Instantly share code, notes, and snippets.

View zhmushan's full-sized avatar

木杉 zhmushan

  • Bytedance
  • Beijing, China
  • 13:00 (UTC +08:00)
View GitHub Profile
@zhmushan
zhmushan / .npmrc
Last active July 24, 2024 08:57
Use npm with taobao mirror
registry=https://registry.npm.taobao.org/
disturl=https://npm.taobao.org/dist
chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
operadriver_cdnurl=http://cdn.npm.taobao.org/dist/operadriver
phantomjs_cdnurl=http://cdn.npm.taobao.org/dist/phantomjs
sass_binary_site=http://cdn.npm.taobao.org/dist/node-sass
electron_mirror=http://cdn.npm.taobao.org/dist/electron/
selenium_cdnurl=http://npm.taobao.org/mirrors/selenium
node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector
@zhmushan
zhmushan / git-note
Last active January 24, 2019 06:34
#### git clone
```
下载 git clone <url>
```
#### git remote
```
查看详情 git remote -v
更换源 git remote set-url <name> <url>
// Type definitions for jQuery 1.10
// Project: http://jquery.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Christian Hoffmeister <https://github.com/choffmeister>
// Steve Fenton <https://github.com/Steve-Fenton>
// Diullei Gomes <https://github.com/Diullei>
// Tass Iliopoulos <https://github.com/tasoili>
// Jason Swearingen <https://github.com/jasons-novaleaf>
// Sean Hill <https://github.com/seanski>
// Guus Goossens <https://github.com/Guuz>
@zhmushan
zhmushan / pac.js
Last active May 22, 2024 10:45
pac.txt
var direct = "__DIRECT__";
if (direct == "__DIR" + "ECT__") direct = "DIRECT;";
var wall_proxy = function(){ return "__PROXY__"; };
var wall_v6_proxy = function(){ return "__PROXY__"; };
var nowall_proxy = function(){ return direct; };
var ip_proxy = function(){ return nowall_proxy(); };
var ipv6_proxy = function(){ return nowall_proxy(); };
{
"name": "Abc",
"version": "0.0.0",
"author": "木杉",
"keywords": [
"http"
],
"entry": "mod.ts"
}
/**
* @template {number} T
* @param {T} start
* @param {T} end
* @param {T | (old: T) => T} increase
* @returns {T[]}
*/
export default function range(start, end, increase = 1) {
const increaser = typeof increase === 'function'
? increase