WishMeLz

生活其实很有趣

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

Parallels Desktop 19.3.0 54924 破解教程(pd19永久授权)

转至:https://www.luoxx.top/archives/pd-18-active?cid=1621、在pd官网下载安装包并且安装,安装完成后退出pd,也可以直接点击下方地址下载。(按需下载所需版本,目前推荐下载19.1.0)19.0.0 https://download.parallels.com/desktop/v19/19.0.0-54570/ParallelsDesktop-19.0.0-54570.dmg19.1.0 https://download.parallels.com/desktop/v19/19.1.0-54729/...

修改原型链导致前端预览PDF异常

添加/修改原型链,导致pdf.js解析异常, 可能此库对原型链做了防污染处理报错如下The `Array.prototype` contains unexpected enumerable properties: hasItem, removeItem; thus breaking e.g. `for...in` iteration of `Array`s其中 hasItem , removeItem 为自定义添加的内容解决方法 let unexpectedProperties = [], logArr = []; for (let key...

移动端 pdfh5 预览pdf

import pdfh5 from "pdfh5"; import "pdfh5/css/pdfh5.css";let pdfH5Res = new pdfh5("#signpdf", { pdfurl: resUrl, responseType: "blob", });报错异常The `Array.prototype` contains unexpected enumerable properties: hasItem, removeItem; ...