WishMeLz

生活其实很有趣

Yum

yum history list 查看操作历史yum history undo id   卸载

BBR

bbr Plus wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh https://cdn.jsdelivr.net/gh/WishMelz/file/sh/bbr1.shUbuntu内核升级以及如何开启BBR加速1.) Ubuntu开启BBR的前提是内核必须等于高于4.9 查看命令...

charles for mac

// 适用于Charles任意版本的注册码 // help---> register Registered Name: https://zhile.io License Key: 48891cf209c6d32bf4 文章原链: https://zhile.io/2017/07/07/charles-proxy-usage-and-license.html

Vue项目错误笔记

一,路由错误import VueRouter from 'vue-router' const VueRouterPush = VueRouter.prototype.push VueRouter.prototype.push = function push(to) { return VueRouterPush.call(this, to).catch(err => err) }二,不停发送请求1. 找到/node_modules/sockjs-client/dist/sockjs.js 2.找到代码的 1605行 try { ...

pm2

pm2 start xxx --watch ##自动重启自动重启会出现一个问题,在上传文件的时间会出现跨域问题。其他接口都没有问题。

Node接口笔记

JTW 生成TOKEN let token = jsonwebtoken.sign({ id: data[0].id // 数据 }, secret, { expiresIn: 60 * 60 * 24 * 30 * 6 }) // 半年,过期时间 ,单位秒 secret为秘钥 解析 try { // 解析令牌,返回对象:{ exp: 过期时间, crt:创建时间 ...} userInfo = jwt.ve...

Centos安装Nginx

# 依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel # 下载安装包 wget http://nginx.org/download/nginx-1.13.7.tar.gz # 解压 tar -xvf # 进入运行文件 ./configure # 运行编译 make # 安装 make install nginx reload 重启 service nginx restart nginx -t 验证配置文件# 一份模板,不完整 worker_proc...

Nodejs,Mysql连接出错

const connection = mysql.createConnection(db)长时间不操作mysql,会自动关闭连接,导致服务中断。修改为:使用连接池const connection = mysql.createPool(db)const mysql = require('mysql'); const config = require('./config') const conn = mysql.createPool(config.db); var queryDB = func...

speedtest-cli测试带宽

# wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py # chmod +rx speedtest.py # sudo mv speedtest.py /usr/local/bin/speedtest-cli # sudo chown root:root /usr/local/bin/speedtest-cli speedtest-cli --bytes以字节计算的方式来测试上下行速度 speedtest-cli --share将速度测试的结...

使用request后台发送请求

处理有跨域的接口。后台调用const request = require('request'); router.get("/wnl", (req, res) => { request('https://www.sojson.com/open/api/lunar/json.shtml', function(error, response, body) { if (!error && response.statusCode == 200) { console.log(body) // S...

阿里大鱼发送短信

// 配置 const Core = require('@alicloud/pop-core'); var client = new Core({ accessKeyId: '****', // id accessKeySecret: '***', // 密钥 endpoint: 'https://dysmsapi.aliyuncs.com', apiVersion: '2017-05-25' }); // 用户模板信息 var params = { "RegionId": "cn-han...

阿里OSS存储

nodejs发送文件到public内,调用oss接口上传文件。 <input type="file" name="" id="photo"> $("#photo").on("change", function () { let file = $(this)[0].files[0]; let formdata = new FormData(); formdata.append("photo", file); $.ajax({ typ...

一段神奇的代码

alert((++[[]][+[]]/[]+[])[+[]]+([{}]+[])[++[[]][+[]]+[+[]]-+!+[]-+!+[]-+!+[]]+(![]+[])[!+[]+!+[]]+([{}]+[])[+!+[]]+'v'+(-{}+[]+[]+[][+[]])[+!+[]+[+[]]]+([{}]+[])[++[[]][+[]]+[+[]]-+!+[]-+!+[]-+!+[]]+(++[[]][+[]]/[]+[])[+!+[]+[+[]]-!+[]-!+[]-!+[]]+([{}]+[])[+!+[]]+([][[]]+[])[+...

Nodejs流

const fs = require("fs")// 创建写入流,就是先创建个文件。这个文件是空的。let ws = fs.createWriteStream('./public/upload/' + fileName); 写入数据 这里是二进制数据ws.write(req.file.buffer);  监听打开ws.on("open",function(fd){     console.log("文件正在打开",fd)...

项目树状图展示

npm install -g tree-cli treee -l 2 -o out.md --ignore [node_modules,config.js,package-lock.json,package.json]

nodejs发送邮件

开启QQ邮箱的SMTP服务// 安装npm install nodemailer --save var nodemailer = require('nodemailer'); var transporter = nodemailer.createTransport({ service: 'qq', port: 465, // SMTP 端口 secureConnection: true, // 使用 SSL auth: { // 你的smtp账号 user: '**********',...

3D旋转相册

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <link type="text/css" href="https://itsse.oss-cn-shanghai.aliyuncs.com/lib/chaos/3DpotoAlbum.css" rel="stylesheet" /> <script src="https://itsse.oss-cn-shanghai.aliyuncs....

记录跨域一些资料

node简单服务器apicors包设置请求头方法header("Access-Control-Allow-Origin: *"); // 允许任意域名发起的跨域请求 header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With');Vue中psot请求后台node接收不到参数 let pars = new URLSearchParams(); pars.append("user","yhm"); this.$axios.post("/...

各浏览器的用户代理字符串整理

1. IE 和 IE Mobile 浏览器WindowsIE 9Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)WindowsIE 10Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)WindowsIE 11Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like GeckoWindows PhoneIE 10M...