部分内容源自网络,侵删,联系请看关于或声明。

随机字符生成

背景 自己创建文章口令太费脑了,不想使用统一口令,所以……便有了下面。 代码 import random import string import json import os from datetime import datetime from typing import Dict, List,

thumbnail of the cover of the post

随机图API

代码 from flask import Flask, send_file, abort import os import random app = Flask(__name__) # 指定图片文件夹路径 images_dir = 'images' # 获取随机图片 @app.route('/

thumbnail of the cover of the post

删除数据库指定行

背景 在使用umami做流量统计时发现在来源域名会出现服务器IP地址,这是因为有时候我会使用IP访问来测试。但我不想出现我服务器的真实IP,于是我想到umami使用的是数据库,删除相应数据就应该OK。 代码 python 需要有python环境,需要安装可参考这里;需要mysql-connector

thumbnail of the cover of the post

透视效果

思路 在wallpaper上面制作了一张X射线效果的壁纸,突发奇想CSS+JS能否实现这一效果。 代码 <style> body { margin: 0; overflow: hidden; } .container { pos

thumbnail of the cover of the post

漫画组件思路

前言 最近接触到了一种新的文件格式.cbz,可以在不打的情况下对里面的图片进行浏览,这对想分享漫画或者图片的我有很大的帮助。 方便管理,将图片放在一个压缩包里面,管理时可只对其压缩包进行管理。 方便插入,使用Markdown多图片不方便插入,虽然我已用上脚本,看下方代码JSON插入。 无需命名,为方

thumbnail of the cover of the post

纯JS弹幕效果

代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>全屏弹幕</title> <style> /* 页面主体样式,确保无边距、无内边距、无滚动条,高度为100%,背景

thumbnail of the cover of the post

DCDN宕机修复

背景 一觉醒来网站宕机了,报502的错误,经过排查后发现是DCDN的问题。不使用DCDN,域名使用A指向服务器IP地址就可以正常访问。 解决 经过一次次的试探,发现使用一个新域名来执行A,在DCDN中使用源站域名来进行指向,将两个域名的SSL配好后即可正常访问。 flowchart LR

thumbnail of the cover of the post