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 * as React from 'react' | |
declare module 'react' { | |
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> { | |
flex?: boolean | |
relative?: boolean | |
text?: string | |
grid?: boolean | |
before?: string | |
after?: string | |
shadow?: boolean |
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
{ | |
"extends": "@antfu", | |
"rules": { | |
"curly": "off", | |
"arrow-parens": "off", | |
"@typescript-eslint/brace-style": "off", | |
"@typescript-eslint/consistent-type-definitions": "off", | |
"@typescript-eslint/no-unused-vars": [ | |
"error", | |
{ |
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 path from 'path' | |
import fs from 'fs' | |
import store from 'svgstore' | |
import { optimize } from 'svgo' | |
import type { Plugin, ViteDevServer } from 'vite' | |
interface Options { | |
id?: string | |
inputFolder?: string | |
inline?: boolean |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
var age int8 = 18 // -128 ~ 127 | |
var daysToLive int16 = 10_000 // -32768 ~ 32767 |
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
apk add libx11-dev | |
apk add xvfb | |
Xvfb :99 -screen 0 1024x768x24 | |
export DISPLAY=:99.0 | |
xclip -selection clipboard -t image/png -i dog.jpg | |
echo "123" | xclip -selection clipboard |
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
<scheme name="Monokai - Frank" version="142" parent_scheme="Darcula"> | |
<metaInfo> | |
<property name="created">2020-04-12T15:35:52</property> | |
<property name="ide">WebStorm</property> | |
<property name="ideVersion">2020.1.0.0</property> | |
<property name="modified">2020-12-09T16:19:39</property> | |
<property name="originalScheme">_@user_Monokai</property> | |
</metaInfo> | |
<colors> | |
<option name="CARET_COLOR" value="f8f8f0" /> |
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
; ! is Alt | |
; + is Shift | |
; ^ is Ctrl | |
; # is Win | |
F1:: | |
Send {LWin Down}{1}{LWin Up} | |
return | |
CapsLock::SetCapsLockState, Off |
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
对于已创建的Docker Machine实例,更换镜像源的方法如下 | |
在windows命令行执行docker-machine ssh [machine-name]进入VM bash | |
sudo vi /var/lib/boot2docker/profile | |
在--label provider=virtualbox的下一行添加--registry-mirror https://xxxxxxxx.mirror.aliyuncs.com | |
重启docker服务: | |
sudo /etc/init.d/docker restart | |
或者重启VM:exit退出VM bash,在windows命令行中执行docker-machine restart | |
## 如果是新建Docker Machine实例,参考阿里云的操作文档https://cr.console.aliyun.com/#/accelerator |
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
const isProd = process.env.NODE_ENV === 'production' | |
module.exports = { | |
webpack: (config, options) => { | |
const {isServer} = options | |
config.module.rules.push({ | |
test: /\.(svg|png|jpe?g|gif)$/i, | |
use: isServer ? ['ignore-loader'] : [ | |
{ | |
loader: 'file-loader', |
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 # 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 二进制包镜像 |