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
import axios from "axios" | |
import dayjs from "dayjs" | |
import path from "path" | |
import fs from "fs" | |
const PAGE_SIZE = 50 | |
const MIN_MC = 15 * 1000 | |
function formatMC(val){ |
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
function prefetch(nodeLists) { | |
// Exclude slow ECTs < 3g | |
if ( | |
navigator.connection && | |
(navigator.connection.effectiveType === "slow-2g" || | |
navigator.connection.effectiveType === "2g") | |
) { | |
return; | |
} |
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
aHR0cD0xMDAuMTAwLjEwMC4xMDA6MTAwMDAsIG92ZXItdGxzPWZhbHNlLCBmYXN0LW9wZW49ZmFsc2UsIHVkcC1yZWxheT1mYWxzZSwgdGFnPeWFrOS8l+WPt+WiqOmxvOaJi+iusC3mlLbotLnor7fkuL7miqUKaHR0cD1vcy50ZW5jZW50Y2RuLm5ldDoyNTAwMCxvdmVyLXRscz1mYWxzZSwgZmFzdC1vcGVuPWZhbHNlLCB1ZHAtcmVsYXk9ZmFsc2UsIHNlcnZlcl9jaGVja191cmw9aHR0cDovL2ludGVyZmFjZTMubXVzaWMuMTYzLmNvbSwgdGFnPfCfkJ/nvZHmmJPkupHop6PplIExCmh0dHA9cGMudGVuY2VudGNkbi5uZXQ6MzUwMDAsIG92ZXItdGxzPWZhbHNlLCBmYXN0LW9wZW49ZmFsc2UsIHVkcC1yZWxheT1mYWxzZSwgc2VydmVyX2NoZWNrX3VybD1odHRwOi8vaW50ZXJmYWNlMy5tdXNpYy4xNjMuY29tLCB0YWc98J+Qn+e9keaYk+S6keino+mUgTIKaHR0cD1tdXNpYy5zd2NjLnh5ejo5MDgwLCBvdmVyLXRscz1mYWxzZSwgZmFzdC1vcGVuPWZhbHNlLCB1ZHAtcmVsYXk9ZmFsc2UsICBzZXJ2ZXJfY2hlY2tfdXJsPWh0dHA6Ly9pbnRlcmZhY2UzLm11c2ljLjE2My5jb20sdGFnPfCfkJ/nvZHmmJPkupHop6PplIEzCmh0dHA9MTU1LjI0OC4xNjkuMjA1OjcwLCBvdmVyLXRscz1mYWxzZSwgZmFzdC1vcGVuPWZhbHNlLCB1ZHAtcmVsYXk9ZmFsc2UsIHNlcnZlcl9jaGVja191cmw9aHR0cDovL2ludGVyZmFjZTMubXVzaWMuMTYzLmNvbSwgdGFnPfCfkJ/nvZHmmJPkupHop6PplIE0Cmh0dHA9NDIuMTkzLjIzMS40ODo3MCwgb3Zlci10bHM9ZmFsc2Us |
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
function FindProxyForURL(url, host){ | |
if(host.includes("") ) { | |
return "PROXY 10.224.200.25:8899"; | |
} | |
return "DIRECT"; | |
} |
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
export function onVisibilityChange(cb) { | |
let hidden; | |
let visibilityChange; | |
if (typeof document.hidden !== "undefined") { | |
// Opera 12.10 and Firefox 18 and later support | |
hidden = "hidden"; | |
visibilityChange = "visibilitychange"; | |
} else if (typeof document.msHidden !== "undefined") { | |
hidden = "msHidden"; | |
visibilityChange = "msvisibilitychange"; |
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
export function debounce(callback, wait) { | |
let timeoutId = null; | |
return (...args) => { | |
window.clearTimeout(timeoutId); | |
timeoutId = window.setTimeout(() => { | |
callback.apply(null, args); | |
}, wait); | |
}; | |
} |
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
import { useState, useEffect } from "react"; | |
export default function useMousePosition() { | |
const [mousePosition, setMousePosition] = useState({ x: null, y: null }); | |
useEffect(() => { | |
const updateMousePosition = (ev) => { | |
setMousePosition({ x: ev.clientX, y: ev.clientY }); | |
}; | |
window.addEventListener("mousemove", updateMousePosition); |
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
{ | |
"name": "", | |
"version": "0.1.0", | |
"description": "", | |
"main": "./dist/index.js", | |
"module": "./dist/index.mjs", | |
"types": "./dist/index.d.ts", | |
"exports": { | |
".": { | |
"require": "./dist/index.js", |
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
[{ | |
"name": "React + styled-jsx", | |
"value": "https://github.com/z-tmpl/react_styled-jsx.git" | |
}, { | |
"name": "A generic template for writing babel plugins.", | |
"value": "https://github.com/evolify/babel-plugin-template.git" | |
}, { | |
"name": "Build Electron app with React", | |
"value": "https://github.com/z-tmpl/electron_react.git" | |
}] |
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 diff | |
# 查看尚未暂存的某个文件更新了哪些 | |
git diff filename | |
# 查看已经暂存起来的文件和上次提交的版本之间的差异 | |
git diff –cached | |
# 查看已经暂存起来的某个文件和上次提交的版本之间的差异 | |
git diff –cached filename | |
# 查看某两个版本之间的差异 | |
git diff ffd98b291e0caa6c33575c1ef465eae661ce40c9 b8e7b00c02b95b320f14b625663fdecf2d63e74c |
NewerOlder