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....