Skip to content

Instantly share code, notes, and snippets.

View zhiqiang21's full-sized avatar
🇨🇳
Happy

ZhiQiangHou zhiqiang21

🇨🇳
Happy
View GitHub Profile
@zhiqiang21
zhiqiang21 / .eslintrc.js
Created June 9, 2017 03:41
.eslintrc.js 配置文件
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"amd": true,
"mocha": true,
"commonjs": true
},
"parser": "babel-eslint",
@zhiqiang21
zhiqiang21 / mdnTozh-cn.js
Last active March 25, 2021 10:49
MDN搜索结果自动跳转中文简体页面
// ==UserScript==
// @name MDN自动转化中文简体
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://developer.mozilla.org/*
// @run-at document-end
// @grant none
// ==/UserScript==
@zhiqiang21
zhiqiang21 / run.sh
Created May 4, 2018 02:11
npm设置淘宝镜像.sh
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set chromedriver_cdnurl http://cdn.npm.taobao.org/dist/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl http://cdn.npm.taobao.org/dist/operadriver # operadriver 二进制包镜像
npm set phantomjs_cdnurl http://cdn.npm.taobao.org/dist/phantomjs # phantomjs 二进制包镜像
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass # node-sass 二进制包镜像
npm set electron_mirror http://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
npm set selenium_cdnurl=http://npm.taobao.org/mirrors/selenium
@zhiqiang21
zhiqiang21 / gist:60317bcc198a703e1c158b6e851ec524
Last active November 9, 2019 04:23
获取网络请求各个阶段的信息
import { urlQuery } from './url';
(function(){
const entryList = performance && performance.getEntries && performance.getEntries();
const country = urlQuery.location_country;
const cityid = urlQuery.location_cityid;
let linkPerformance = null;