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
#!/usr/bin/env bash | |
set -euxo pipefail # 抛出异常 | |
dd # 删除一行 | |
yy # 复制一行 | |
p # 粘贴 | |
cp Filename newFilename # 复制文件 | |
ctrl+d # 向下翻半页 | |
echo $diff_info | awk -F "[version]" '{print $0}' |
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
<template> | |
<div class="text-ellipsis" :style="{height: textHeight,lineHeight: lineHeight}"> | |
<div class="ellipsis-before" :style="{height: textHeight}"></div> | |
<div class="ellipsis-content"> | |
<template v-if="$slots.default"> | |
<slot></slot> | |
</template> | |
<template v-else>{{text}}</template> | |
</div> | |
<div class="ellipsis-after" :style="{top: '-'+lineHeight, height: lineHeight}">...</div> |
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
/* 切换滚动条页面闪动 */ | |
html { | |
overflow-y: scroll; | |
} | |
:root { | |
overflow-y: auto; | |
overflow-x: hidden; | |
} |
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
// https://eslint.org/docs/user-guide/configuring | |
/* | |
* 0 - off | |
* 1 - warn | |
* 2 - error | |
*/ | |
module.exports = { | |
extends: "eslint:recommended", | |
parser: "@typescript-eslint/parser", | |
parserOptions: { |
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
const http = require('http'); | |
let server; | |
function onRequest(req, res) { | |
console.log('[' + this.name + ']', req.method, req.url); | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
} |
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
const { createReadStream, createWriteStream } = require('fs'); | |
const tar = require(tar); | |
const dest = process.cwd(); | |
// A: remote download | |
// A1: use lib | |
let res = await axios.get(url, { | |
responseType: 'stream' | |
}); | |
let writer1 = createWriteStream(dest, { |
OlderNewer