WishMeLz

生活其实很有趣

nginx禁止ip访问

server { listen 80 default; server_name _; return 500; }OR if ($host ~ "\d+\.\d+\.\d+\.\d") { return 500; # 或者444 }

网站首页缓存

<?php $nowtime=time(); $pastsec = $nowtime - $_GET["t"]; if($pastsec<600) { exit; //10分钟更新一次,时间可以自己调整 } ob_start(); //打开缓冲区 include("index.php"); $content = ob_get_contents(); //得到缓冲区的内容 $content .= "\n<script language=javascript src=\"f5_cache.php?t=".$nowtime."\...

网站防护

这个脚本备份网站wget --mirror -t 2 -S -N -k https://blog.itsse.cn -P /home/wwwroot/public/1.使用wget命令,下载一份网站的镜像(网站上公开的所有内容... 2.得到一份静态镜像(里面有html/jpg/...; 3.其中的参数-k为将链接转化为本地路径; 4.其中的参数-P为备份保存路径,届时会自动创建文件夹,文件名字将以网站名字命名; 5.最终得到 /home/wwwroot/public/blog.itsse.cn;使用静态镜像修改nginx配置路径以使用静态镜像;i...

下载文件

function downloadFile(u) { http.get(u, (res) => { var data = ""; res.setEncoding('binary'); res.on('data', function (chunk) { data += chunk }) res.on('end', () => { let filename = Date.now(); fs.wr...

zfaka 宝塔安装纪录

官方安装教程https://github.com/zfaka-plus/zfaka/wiki/%E5%AE%9D%E5%A1%94%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%A6%82%E4%BD%95%E8%BF%9B%E8%A1%8C%E9%85%8D%E7%BD%AE安装修改 conf目录下的 application.ini.new 为 application.ini配置YAFextension=yaf.so yaf.environ='product' yaf.use_namespace=1

Vue - 使用 GitHub Actions 部署到 GitHub Pages

# This is a basic workflow to help you get started with Actions name: deploy # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the main branch push: branches: - main pull_request: branches: ...

IOS消息推送

httpAPi将消息推送到IOShttps://day.app/2018/06/bark-server-document/使用教程: https://github.com/Finb/Bark/blob/master/README.md

京东定时任务

定时任务:https://github.com/chinnkarahoi/jd_scripts.git备份:https://cdn.jsdelivr.net/gh/WishMelz/file@master/messy/f94f312e845853482e46dbc1106dc2be.zip青龙面板 dockerhttps://github.com/whyour/qinglongdocker pull whyour/qinglong:latest docker run -dit \ -v $PWD/ql/config:/ql/config \...

JD cookie

登录: https://bean.m.jd.com/bean/signIndex.action获取cookie工具: https://cdn.jsdelivr.net/gh/WishMelz/file@master/messy/c05926031ad96a562bf2732aa28ff987.zip

uniapp 导航栏tab切换 底下有个长方形跟着滑动

获取文字的宽度, 在拿到文字距离左侧的距离. 每次点击就更新一下宽度和left var that = this; const query = uni.createSelectorQuery().in(that); query.select('#nav').boundingClientRect(data => { data.width; data.left; console.log(JSON.strin...

scroll-view IOS 端出现滚动条

在对应的元素添加style/deep/ .uni-scroll-view::-webkit-scrollbar { display: none } // or >>> .uni-scroll-view::-webkit-scrollbar { display: none }

Vue移动端轮播图 中间大,两边露一点

npm install vue-awesome-swiper@3 npm install swiper<template> <div v-if="items.length" class="full-page-slide-wrapper"> <swiper :options="swiperOption" ref="mySwiper"> <!-- slides --> <template v-for="(item, i) in items"> ...

阿里犸良使用笔记 lottie-web

官网:https://design.alipay.com/介绍:https://www.yuque.com/lottie/document/readme使用:https://www.yuque.com/lottie/document/webnpm i lottie-web <div class="box" ref="box"></div> <button @click="startFun">播放</button> <button @click="suspendFun">暂停</button>...

CSS 一键黑白

-moz-filter:grayscale(100%); -ms-filter:grayscale(100%); -o-filter:grayscale(100%); filter:grayscale(100%); filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'...

apt 命令

Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)ps aux|grep apt sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a