Skip to content

Instantly share code, notes, and snippets.

View erguotou520's full-sized avatar

erguotou erguotou520

View GitHub Profile
@erguotou520
erguotou520 / gist:5b0e3e14d590daefb0f445c5f4823a48
Last active November 28, 2023 05:57
git clone specify primary key
git -c core.sshCommand="ssh -i ~/.ssh/id_ed25519" clone git@xxx.xxx.xxx/xxx/xxx.git
@erguotou520
erguotou520 / .env
Last active February 13, 2020 12:03
gogs+drone+traefix docker-compose config file
# 顶级域名
SERVER_DOMAIN=erguotou.me
# Time Zone
TIME_ZONE=Asia/Shanghai
# ACME
ACME_EMAIL=erguotou525@gmail.com
# Drone
@erguotou520
erguotou520 / index.html
Created July 19, 2018 03:45
unable to disable selection outside the editor, run `electron main.js`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style href="https://cdn.quilljs.com/1.3.6/quill.snow.css"></style>
<style>
*,
@erguotou520
erguotou520 / index.html
Created July 19, 2018 03:44
unable to disable selection outside the editor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style href="https://cdn.quilljs.com/1.3.6/quill.snow.css"></style>
<style>
*,
doc := WB.doc
^!1::
Sleep, 500
WinActivate,Chrome
SendInput, admin@erguotou.me
Send, {tab}
SendInput, 1234qweR
Send, {Enter}
return
<template>
<div class="wrapper">
<div v-if="$slots.icon" class="icon">
<slot name="icon"></slot>
</div>
<input class="input" :class="{'with-icon':!!$slots.icon}" v-bind="$props" :value="inputVal"
@input="handleInput"
@change="(...args)=>$emit('change',...args)"
@focus="handleFocus"
@blur="(...args)=>$emit('blur',...args)"
const getTextFeature = (text, color) => {
try {
const canvas = document.createElement('canvas');
/*
因为进行scale以后的图案区域实际上不能确定,
理论上应该只在(0,0,1,1),但有的也会在它周围的像素里,
综合效率的考虑,给一个2*2的范围是比较合适的;
*/
canvas.width = 2;
canvas.height = 2;
@erguotou520
erguotou520 / EchartBar.vue
Last active December 9, 2016 08:20
EchartBar.vue
<template>
<div class="ui-echart ui-echart-bar" ref="chart"></div>
</template>
<script>
import echarts from 'echarts/lib/echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/title'
import 'echarts/lib/component/tooltip'
export default {
{
"title": {
"text": "CPU使用率"
},
"tooltip": {
"trigger": "axis"
},
"legend": {
"data": [
"CPU使用率"
<template>
<div class="ui-data-table flex flex-1 flex-column">
<div v-if="$slots.toolbar" class="toolbar">
<slot name="toolbar"></slot>
</div>
<div class="data-table flex flex-1" ref="wrapper">
<el-table :data="data" border :height="avaliableHeight"
:row-key="(row)=>row[rowKey]" :multiple="multiple"
@selection-change="onSelectionChange">
<slot></slot>