WishMeLz

生活其实很有趣

Wish 发布的文章

个人收款免签约

这个软件叫做“双卡助手”,是一个监听手机短信、应用通知的软件,他可以将你手机的短信、应用通知等信息进行转发,可以转发到邮箱,公众号,甚至是手机号,还可以转发给服务器。我们只需要使用他这个特性,将收到的微信支付通知,转发给服务器。软件软件: https://www.coolapk.com/apk/com.cozylife.smshelper2021/5/6备份:app-release-176517-o_1f3mfcmeqboi1ogbrm91j7u1luc10-uid-855054.apk设置BODY的格式{"title":"{{title}}","...

gravatar全球通用头像

 https://cn.gravatar.com/avatar/4c6e391ddde7dae7d9ebf03bb584c064?s=73&d=retro这里需要一个哈希值来确定头像的唯一性, 通过MD5加密就可以.s是尺寸, d是类型对应如下 .item { display: flex; align-items: center; margin-top: 20px; } .item img { margin-right: 12px;margin-left...

移动端input输入时页面放大

<meta content="yes" name="apple-mobile-web-app-capable"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">

微信机器人

https://github.com/padlocal/wechaty-puppet-padlocal/wiki/TOKEN-%E7%94%B3%E8%AF%B7%E6%96%B9%E6%B3%95app.tsimport { PuppetPadlocal } from "wechaty-puppet-padlocal"; import { Contact, log, Message, ScanStatus, Wechaty, Friendship } from "wechaty"; const puppet = new PuppetPadloc...

Centos 6 yum 错误

Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/archcd /etc/yum.repos.d/ 修改 CentOS-Base.repo注释掉 mirrorlist= 开头的注释取消 baseurl 开头的注释将 baseurl 中的mirrorlist.centos.org 改为 vault.centos.org

阿里STS权限管理

打开地址  https://ram.console.aliyun.com/roles创建用户来获取 accessKeyId accessKeySecretRAM角色管理,创建RAM角色,选择阿里云给角色添加权限,可以添加无数个,最重要的是添加AliyunSTSAssumeRoleAccesslet OSS = require('ali-oss'); let STS = OSS.STS; let sts = new STS({ accessKeyId: 'LTAI5*******e4eSf', ...

MySql拿到插入的ID

场景:插入一条数据,这条数据的ID是自增的主键.需要在插入的时候拿到这个IDnpm i mysql conn.query(sql,(err,data)=>{ console.log(data.insertId) })

Nginx分流

server { listen 443 ssl; server_name api.xxx.com; # index index.html index.htm index.php; # root /aweb/api; ssl_certificate cert/api.pem; ssl_certificate_key cert/api.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HI...

NodeJs抓取页面

npm i cheerio request iconv-lite思路:通过 request 获取到页面。在使用 iconv-lite 编译数据。在使用 cheerio 拿到对应的元素。这里以抓取微博热搜为例const cheerio = require('cheerio'); const request = require('request'); const iconv = require('iconv-lite'); function http(url, decode = 'utf8') { return new Promise((res...

MySql3306端口笔记Can’t connect to MySQL server(60)的问题

阿里云服务器。端口全开。防火墙关闭。安全组端口全开。就是连不上。Can’t connect to MySQL server(60)的问题 sudo iptables -L可以看到一条mysql的规则。这个时候需要把他删掉sudo iptables -L -n --line-number sudo iptables -D INPUT 6

NodeJs抓取页面内容

const cheerio = require('cheerio'); const request = require('request'); let url = 'https://btc.com/' request({ url: url, encoding: null }, function (error, response, body) { if (!error && response.statusCode == 200) { var buf = iconv.decode(body...

随机数

function getRandom(start, end, fixed = 0) { let differ = end - start let random = Math.random() return (start + differ * random).toFixed(fixed) }getRandom(1,5) 1<= num >=5

H5打电话发短信

<meta name="format-detection" content="telephone=yes"/> <a href="tel:13660007710">13660007710</a> <a href="sms:13660007710">13660007710</a>

保存图片文件,下载图片

function downloadIamge(imgsrc, name) { //下载图片地址和图片名 let image = new Image(); // 解决跨域 Canvas 污染问题 image.setAttribute("crossOrigin", "anonymous"); image.onload = function () { let canvas = document.createElement("canvas"); ...

赛邮云通信SUBMAIL

NodeJs发送短信var request = require('request'); let post = function (url, postdata) { let options = { url: url, formData: postdata }; return new Promise(function (resolve, reject) { request.post(options, function (err, response, body) { ...

根据元素宽度设定高度比例

要求:图片根据宽度设置高度。正方形.shopimg { width: 100%; height: 0; padding-bottom: 100%; // 这个就是高的比例 position: relative; } .shopimg-info { position: absolute; top:0; left: 0; bottom: 0; right: 0; } .shopimg img { width: 100%; height: 100%; }

Vue中可以选择文字高亮的插件

npm install --save vue-text-highlightimport TextHighlight from ‘vue-text-highlight’; Vue.component(‘text-highlight’, TextHighlight);<text-highlight :queries="queries">{{ description }}</text-highlight> data() { return { queries: ['birds', 'scatt'],//需要高亮的文字 ...

粘贴图片 ctrl+v

document.addEventListener("paste", function (event) { var isChrome = false; if (event.clipboardData || event.originalEvent) { //某些chrome版本使用的是event.originalEvent var clipboardData = event.clipboardData || event.originalEvent.clipboard...