2022-07-25 15:15:12
create database [数据库名称] default character set utf8mb4 collate utf8mb4_general_ci;
create table docliste (
`id` varchar(20) not null,
`title` varchar(500) null comment '标题',
`cateid` varchar(50) null comment '关联的类型',
primary key (`id`) using btree
) engine =InnoDB character set = utf8mb4 collate = utf8mb4_general_ci row_format=Dynamic;
2022-07-21 11:02:00
ps -ef|grep tomcat|grep -v grep|awk '{print $2}'|xargs kill -9
2022-07-16 23:37:30
该给的都给了,该放的都放了,端口啥的都没问题,最后就是不行。 我这边的问题是这样的。 创建了 ftpadmin 用户,他的主目录是 /home/ftpadmin 但是我定义的他的目录是 /mnt/ftpadmin 然后设定在了 vsftp.conf 文件中,最终通过一遍一遍的尝试,发现了这个问题...
如果实在不行,文件夹就别换了,用默认的吧。
2022-07-13 17:58:05
mkdir /root/test
# 写入速度
time dd if=/dev/zero of=/root/test/out bs=4k oflag=direct count=500000
# 读取速度
time dd if=/root/test/out of=/dev/null bs=4k
2022-07-13 15:53:44
find . -newermt '2022-07-02' ! -newermt '2022-07-3'
find . -mtime 10
-mtime n : n为数字,意思为在n天之前的“一天之内”被更改过内容的文件
-mtime +n : 列出在n天之前(不含n天本身)被更改过内容的文件名
-mtime -n : 列出在n天之内(含n天本身)被更改过内容的文件名
2022-06-30 15:46:32
netsh wlan show profile "qingdao" key=clear
2022-06-28 09:20:40
个人在浏览的时候碰到的觉的好看的字体
x-locale-heading-primary,zillaslab,Palatino,"Palatino Linotype",x-locale-heading-secondary,Source Han Serif SC,STZhongsong,simsun,serif
beauty, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji
2022-06-22 17:43:57
# 校验数字,最多3位正整数(不限制0开头) ,小数最多两位
/^\d{1,3}(\.\d{1,2})?$/
2022-06-22 07:57:42
ffmpeg -i /data/video_1.mp4 -f image2 -vf fps=fps=1/60 -qscale:v 2 /data/mp4-%05d.jpeg
批量截图
#!/usr/bin/env bash
videos_root=/data/videos
save_root=/data/video_imgs/Image_fps50/
for video in $videos_root/*;
do
echo $video
save_dir=$save_root$(basename $video .avi)
if [ ! -d $save_dir ];then
mkdir $save_dir
fi
ffmpeg -i $video -f image2 -vf fps=fps=50 -qscale:v 2 $save_dir/mp4-%05d.jpeg
done
2022-06-02 10:16:56
podman exec -it ql /bin/bash
部分容器没有bash 无法进入
podman exec -it ql /bin/sh
2022-05-20 15:29:39
最近在研究nginx,整好遇到一个需求就是希望服务器与客户端之间传输内容是加密的,防止中间监听泄露信息,但是去证书服务商那边申请证书又不合算,因为访问服务器的都是内部人士,所以自己给自己颁发证书,忽略掉浏览器的不信任警报即可。下面是颁发证书和配置过程。
1、首先确保机器上安装了openssl和openssl-devel
# yum install openssl
# yum install openssl-devel
2、生成证书
首先,进入你想创建证书和私钥的目录,例如:
# cd /etc/nginx/
创建服务器私钥,命令会让你输入一个口令:
# openssl genrsa -des3 -out server.key 2048
创建签名请求的证书(CSR):
# openssl req -new -key server.key -out server.csr
在加载SSL支持的Nginx并使用上述私钥时除去必须的口令:
# cp server.key server.key.org
# openssl rsa -in server.key.org -out server.key
最后标记证书使用上述私钥和CSR:
# openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
3、配置Nginx,让其包含新标记的证书和私钥
server {
server_name YOUR_DOMAINNAME_HERE;
listen 443;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
}
2022-04-14 21:43:12
ps -ef | grep "name" | grep -v grep | awk '{print $2}'
pgrep -f name
pidof name
# 根据进程杀掉
pkill -f name
2022-03-24 11:56:26
openssl x509 -outform der -in your-cert.pem -out your-cert.crt
2022-03-05 20:57:32
-- 所有数据库
mysqldump -uroot -p --all-databases > /backup/mysqldump/all.sql
-- 指定数据库
mysqldump -uroot -p test > /backup/mysqldump/test.sql
-- 备份指定数据库指定表(多个表以空格间隔)
mysqldump -uroot -p mysql db event > /backup/mysqldump/2table.sql
2022-02-16 15:30:14
ffmpeg -i input.mp4 -f mp3 -vn output.mp3
ffmpeg -i input.mp3 -ss 03:01 -t 10 output.mp3
ffmpeg -i xiao2.mp3 -i xiao3.mp3 -i xiao4.mp3 -filter_complex '[0:0] [1:0] [2:0] concat=n=3:v=0:a=1 [a]' -map [a] 44.mp3
ffmpeg -i xiao2.mp3 -i xiao3.mp3 -i xiao4.mp3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 -f mp3 3.mp3
2022-01-06 09:23:11
# 修改密码
passwd ftpadmin
# 然后输入密码,重设
# 设置用户密码过期时间
chage -M 99999 ftpadmin
# 查看用户过期时间
chage -l ftpadmin
2022-01-04 23:29:28
高阶看不懂,先记录一个二阶的贝塞尔曲线公式
B(t) = (1-t)^2P0 + 2t(1-t)P1 + t^2P2
//js 实现
function bezier(posa, posb, posc, t) {
let x = (1 - t) ** 2 * posa.x + 2 * t * (1 - t) * posb.x + t ** 2 * posc.x;
let y = (1 - t) ** 2 * posa.y + 2 * t * (1 - t) * posb.y + t ** 2 * posc.y;
return { x, y };
}
2021-09-28 11:30:06
find . -type f -size 100M -print0 | xargs -0 ls -l
du -ht 100M /mnt
2021-06-26 16:52:23
创建虚拟机的时候选择了第二代,需要将安全-安全启动
禁用,重新启动即可。
2021-05-12 14:17:57
以前是parser , 后来换了mp-html ,都是同一个人的,mp-html 版本比较新,但是也不行。需要修改源码parser.js
blockTags : 增加 textarea
ignoreTags : 移除 textarea
voidTags : 增加 textarea
2021-05-12 09:34:14
左上角用户失效,重新登录。或退出重新登录。
2021-03-24 20:39:12
视频是有加密的,不过密钥是uri,可以直接通过m3u8 转为mp4 ,命令如下:
ffmpeg -i https://1252524126.vod2.myqcloud.com/9764a7a5vodtransgzp1252524126/3a09ffca5285890815650319442/drm/v.f146750.m3u8 -c copy -bsf:a aac_adtstoasc d:/mma.mp4
2021-03-23 13:49:13
ffmpeg -i xx.ts -c:v libx264 -c:a copy d:/11.mp4
-c:v video编码
-c:a audio编码
2021-02-26 16:15:24
show full processlist;
//找到waiting xxxx
kill xxid;
2020-12-16 15:01:14
参考: https://blog.csdn.net/github_38924695/article/details/107058061
//安装如下
yum install at-spi2-atk -y
yum install gtk3 -y
2020-12-10 10:38:04
项目为ssl环境,但总有个别请求是: http://xx.com:443/xx 这样访问的,导致报错。 nginx : 可以增加错误页面跳转
error_page 497 https://$host$request_uri;
或者在页面中增加meta,将调用的http请求升级成https请求并调用
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
2020-12-04 14:40:18
在复制微信公众号文章到ueditor后section样式丢失。
//配置ueditor.config.js
whiteList:{
section : ['class','style']
}
增加class
和 style
即可。
2020-12-02 09:04:35
ffmpeg -i test.mp4 -r 10 -b:a 32k test_c.mp4
通过降低帧率和音频码率达到压缩目的。帧率10fps,码率32k.
2020-11-30 15:59:11
需求:访问 http://xxx.com/pro ,通过nginx代理到服务器等于访问 http://localhost/ .
location /pro/ {
proxy_pass http://127.0.0.1:9027/;
}
请注意 / 斜杆 , /pro/ 以及 9027/ ,都不可省略。