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
daemon off; | |
error_log /dev/stdout error; | |
worker_processes 4; | |
events { | |
worker_connections 1024; | |
} | |
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
/** | |
* 提取淘宝地址库 | |
* | |
* 用法: | |
* 1. 打开淘宝 https://www.taobao.com/ | |
* 2. 将下面代码复制到控制台 | |
* 3. 按回车 | |
* 4. 复制输出的 json 数据保存到你的文件 | |
* | |
* 仅支持: chrome 48+ |
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
// Ported from https://github.com/matanki-saito/EU4SpecialEscape/blob/master/ConsoleApplication3/ConsoleApplication3.cpp#L235 | |
module.exports = function specialEscape(char, toUtf8, newVersion) { | |
// DO NOT escape valid char | |
if (char.codePointAt(0) < 256) { | |
return char | |
} | |
const hex = char.codePointAt(0).toString(16) | |
// default if UTF8, so hex is 4 length for most letters | |
// split low byte and high byte | |
// transform decimal to hex |
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
npm set registry https://registry.npm.taobao.org && \ | |
npm set disturl https://npm.taobao.org/dist && \ | |
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass && \ | |
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ && \ | |
npm set puppeteer_download_host https://storage.googleapis.com.cnpmjs.org && \ | |
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver && \ | |
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver && \ | |
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs && \ | |
npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium && \ | |
npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector && \ |