WishMeLz

生活其实很有趣

Wish 发布的文章

随机渐变背景

<style> html, body { margin: 0; } body:after { content: 'click to update'; font-size: 0.8em; color: rgba(0, 0, 0, 0.3); position: fixed; width: 100%; bott...

ANSI 字体在前端展示 Jenkins日志

最近在做运维平台的开发,前端需要显示Jenkins的日志在前端,其中的ANSI字体就是如下示例。192.168.134.39:服务启动,端口检测,等待第3秒 192.168.134.39:服务启动,端口检测,等待第6秒 192.168.134.39:服务启动,端口检测,等待第9秒 192.168.134.39:服务启动,端口检测,等待第12秒 192.168.134.39:服务启动,端口检测,等待第15秒 192.168.134.39:服务启动,端口...

npm 设置与代理

查询当前镜像源npm get registry设置镜像源npm config set registry https://registry.npmmirror.com/electron镜像npm config set ELECTRON_MIRROR "https://npmmirror.org/mirrors/electron/"看和删除electron镜像npm config get ELECTRON_MIRROR npm config delete ELECTRON_MIRROR 查看当前代理npm config get pr...

获取视频某一秒的截图

const handleGetVideoThumb = async function (url, options = {}) { if (typeof url !== "string") { console.error("URL must be a string"); return; } // 默认参数 const ...

SSE(Server-Sent Events)

服务端const express = require("express"); const cors = require("cors"); const app = express(); const port = 6548; app.use(cors()); app.get("/sse", (req, res) => { res.set({ "Content-Type": "text/event-stream", &quo...

公式编辑器

自定义公式编辑器在线预览地址<template> <div class="home"> <div class="calc-main"> <div class="formulaView" id="formulaView" ref="formulaView" @click.stop="recordPosition()...

TOTP otpauth

import * as OTPAuth from "otpauth"; let totp = new OTPAuth.TOTP({ // Provider or service the account is associated with. issuer: "ACME", // Account identifier. label: "AzureDiamond", // Algorithm used for the HMAC fu...

vuedraggable

在线预览<template> <div class="c"> <vuedraggable handle=".handle" class="list-group" tag="ul" v-model="list" v-bind="dragOptions" @start="drag = true" ...

createDecorator 自定义装饰器

二次确认import { MessageBox } from 'element-ui' import { createDecorator } from 'vue-class-component' export function Confirm(msg: any) { return createDecorator(function (opts, handler) { if (!opts.methods) throw new Error( 'This decorator ...

EA Racenet API

公共请求头:const headers = { Authorization: `Bearer eyJraWQiOiIw` }1、查询GET:https://web-api.racenet.com/api/Friend/profile 好友中搜索GET:https://web-api.racenet.com/api/Friend/search 非好友中搜索请求参数,路径参数{ searchTerm: "", // 搜索关键字 pageNumber: 1, pageSize: 20, in...

RustDesk 自建服务器

https://github.com/rustdesk/rustdesk-server/releases rustdesk-server-linux-amd64.zip官网教程:https://rustdesk.com/docs/zh-cn/self-host/rustdesk-server-oss/windows/https://rustdesk.com/zh/下载解压,使用PM2 持久化运行pm2 start hbbs -- -r \[自己的服务器IP地址\] pm2 start hbbr pm2 start hbbs -- -r 192....

Minio 之 Nodejs

docker run -p 9000:9000 -p 9090:9090 --net=host --name minio -d --restart=always -e "MINIO_SERVER_URL=http://111.73.12.186:9000" -e "MINIO_ACCESS_KEY=asd123" -e "MINIO_SECRET_KEY=ert123" -v /home/minio/data:/data -v /home/minio/config:/root/.minio...

nuxt项目本地启动,多开标签一直显示加载中

本地npm run dev启动,多开几个标签页,会出现卡死或一直转圈的情况,如果关闭其中一个tab标签,卡死的tab标签页就会立即加载完成,控制台看不到任何错误信息。 因为浏览器对同一个主机有连接数限制。官方解释:https://github.com/nuxt/nuxt/issues/8190