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
<script setup lang="ts"> | |
import { reactive, shallowRef, watchEffect } from "vue"; | |
interface Item { | |
id: number; | |
name: string; | |
} | |
const name = shallowRef<string>(""); | |
const itemLength = shallowRef<number>(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
<script setup> | |
import { ref, watchEffect } from 'vue' | |
const number = ref(0); | |
const unwatch = watchEffect((onCleanup) => { | |
const id = setInterval(() => { | |
number.value++; | |
}, 1000); | |
onCleanup(() => clearInterval(id)); |
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
getTimes(val) { | |
const [startDateRaw, endDateRaw] = val; | |
const startDate = new Date(startDateRaw); | |
const endDate = new Date(endDateRaw); | |
const diffOfMilliseconds = endDate - startDate; // 时间差,单位毫秒 | |
const hoursOfDay = 24; // 一天的小时数 | |
const millisencondsOfMinute = 60 * 1000; // 每分钟的毫秒数 | |
const millisencondsOfHour = 60 * millisencondsOfMinute; // 每小时的毫秒数 | |
const millisencondsOfDay = hoursOfDay * millisencondsOfHour; // 每天的毫秒数 |
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
ubuntu@ubuntu:~/shenyu/docker/shenyu-v2.4.2$ docker-compose logs -f shenyu-admin | |
Attaching to shenyu-admin | |
shenyu-admin | entrypoint.sh: 19: [[: not found | |
shenyu-admin | current jdk version:1.8.0_322 | |
shenyu-admin | Starting the ShenYu-Admin ... | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 45: [[: not found | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 47: [[: not found | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 49: [[: not found | |
shenyu-admin | Please check the log files: /opt/shenyu-admin/logs/shenyu-admin.log | |
shenyu-admin | at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434) |
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
ubuntu@ubuntu:~/shenyu/docker/shenyu-v2.4.2$ docker-compose logs -f shenyu-admin | |
Attaching to shenyu-admin | |
shenyu-admin | entrypoint.sh: 19: [[: not found | |
shenyu-admin | current jdk version:1.8.0_322 | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 45: [[: not found | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 47: [[: not found | |
shenyu-admin | /opt/shenyu-admin/bin/start.sh: 49: [[: not found | |
shenyu-admin | Starting the ShenYu-Admin ... | |
shenyu-admin | Please check the log files: /opt/shenyu-admin/logs/shenyu-admin.log | |
shenyu-admin | 02:15:20,659 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set |
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 Koa = require('koa'); | |
const os = require('os'); | |
const cluster = require('cluster'); | |
const app = new Koa(); | |
const PORT = process.env.PORT || 5000; | |
const clusterWorkerSize = os.cpus().length; | |
if (clusterWorkerSize > 1) { | |
if (cluster.isMaster) { |
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 express = require('express'); | |
const os = require('os'); | |
const cluster = require('cluster'); | |
const app = express(); | |
const PORT = process.env.PORT || 5000; | |
const clusterWorkerSize = os.cpus().length; | |
if (clusterWorkerSize > 1) { | |
if (cluster.isMaster) { |
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
// ==UserScript== | |
// @name notranslate | |
// @namespace https://gist.github.com/abel533/5839d3eca4686646baba113fc47e9b22 | |
// @version 1.0 | |
// @description 浏览器翻译时排除代码片段 | |
// @author isea533 | |
// @match *://**/* | |
// @grant none | |
// ==/UserScript== |
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 fs = require('fs'); | |
const path = require('path'); | |
const origin = 'C:/origin'; | |
const target = 'C:/target'; | |
const originFiles = fs.readdirSync(origin); | |
const targetFiles = fs.readdirSync(target); | |
originFiles.forEach((el) => { |
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
// ==UserScript== | |
// @name YouTube字幕自动翻译->中文简体 | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description translate to Chinese automatically. 自动点击字幕翻译到中文简体 | |
// @author qwertyuiop6 | |
// @match https://www.youtube.com/watch* | |
// @grant none | |
// ==/UserScript== |