Demo Link
This file contains hidden or 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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
This file contains hidden or 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
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' | |
This file contains hidden or 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 {now} from "../utils/date"; | |
import assert from "../utils/assert"; | |
export interface TimeRanges { | |
start: number, | |
end: number, | |
} | |
export interface PlaybackControlProps { | |
mode?: PlaybackControlMode, // 录播 or 直播 |
This file contains hidden or 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 open | |
sudo npm i -g git-open | |
ncu | |
sudo npm i -g npm-check-updates | |
nrm | |
sudo npm i -g nrm | |
brew |
This file contains hidden or 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 useForceUpdate() { | |
const [, f] = useState(false) | |
const forceUpdate = useCallback(() => f(v => !v), []) | |
return forceUpdate | |
} | |
const useForceUpdate = () => useState()[1]; |
This file contains hidden or 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
# package.json specifics | |
> https://www.npmjs.cn/files/package.json/ | |
## files | |
Entries to be inclued of your package | |
#### priority | |
*files* > .npmignore > .gitignore | |
## main、module、browser |
This file contains hidden or 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
npx create-react-app application --template typescript --use-npm | |
# template | |
https://github.com/microsoft/TypeScript-React-Starter | |
# tsx | |
https://www.typescriptlang.org/docs/handbook/react-&-webpack.html |
This file contains hidden or 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. 原型链继承 | |
*/ | |
function SuperType() { | |
this.property = true; | |
} | |
SuperType.prototype.getSuperValue = function() { | |
return this.property; |
NewerOlder