2024-03-07 18:17:12
安装带有 management的
docker pull rabbitmq:management
docker run -it -d --name rabbitmq -p 5672:5672 -p 15672:15672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin rabbitmq:latest
docker exec -it rabbitmq /bin/bash
rabbitmq-plugins list
rabbitmq-plugins enable rabbitmq_management
# 添加vhost
rabbitmqctl add_vhost /teaching
# 给用户添加权限
rabbitmqctl set_permissions -p /teaching admin '.*' '.*' '.*'
启用管理插件
2024-02-17 23:12:58
# 命令行执行
wsl --shutdown
2024-01-18 23:42:20
ffmpeg -i 2.mp4 -c:v libx264 -c:a aac -strict -2 -hls_list_size 0 -f hls 2_m3u8/index.m3u8
2024-01-18 16:12:29
抓取桌面截图
gdigrab
ffmpeg -f gdigrab -i desktop d:/aa.jpg
抓取摄像头截图
ffmpeg -list_devices true -f dshow -i dummy
ffmpeg -f dshow -i video="Lenovo EasyCamera" d:/abc.jpg
//ps.摄像头会亮一下。
2024-01-11 22:37:27
# 从第10秒开始,截止到第20秒
ffmpeg -i test.mp4 -ss 10 -to 20 out.mp4
# 从第10秒开始,共截取20秒的视频,到30秒
ffmpeg -i test.mp4 -ss 10 -t 20 out.mp4
2023-11-21 12:16:27
kill -9 `ps -ef|grep chrome|awk '{print $2}'`
2023-11-21 12:15:12
find / -type f -size +500M
2023-11-20 17:30:39
vmware workstation 17 pro激活密钥,通用批量永久激活许可 17:JU090-6039P-08409-8J0QH-2YR7F
16:ZF3R0-FHED2-M80TY-8QYGC-NPKYF
15:FC7D0-D1YDL-M8DXZ-CYPZE-P2AY6
12:ZC3TK-63GE6-481JY-WWW5T-Z7ATA
10:1Z0G9-67285-FZG78-ZL3Q2-234JG
vmware workstation 17 pro密匙最新 4A4RR-813DK-M81A9-4U35H-06KND
NZ4RR-FTK5H-H81C1-Q30QH-1V2LA
JU090-6039P-08409-8J0QH-2YR7F
4Y09U-AJK97-089Z0-A3054-83KLA
4C21U-2KK9Q-M8130-4V2QH-CF810
MC60H-DWHD5-H80U9-6V85M-8280D
2023-09-21 11:52:18
可以在my.cnf
中增加以下几项:
slow_query_log = ON
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 0.1
# long_query_time 的单位是秒
也可以在终端中查询如下:
set global slow_query_log ='on';
set globle long_query_time=0.1;
set globle slow_query_log_file=‘ /var/log/mysql/slow.log’;
未使用索引如下:
set global log_queries_not_using_indexes='on';
2023-09-05 09:18:45
ffmpeg -i 1.mp4 -r 15 2.mp4
ffmpeg -i 1.mp4 -b 1.5M 2.mp4
ffmpeg -i 1.mp4 -vf scale=640:360 2.mp4
ffmpeg -i 1.mp4 -fs 100M 2.mp4
这个会把视频截断,不好用
使用上来说 3 比较好用
2023-05-27 11:40:45
procps
yum install procps
apt-get install procps
2023-05-27 09:40:57
不要直接点x 或关闭客户端,要通过命令
nohup node app.js >> ./log.txt 2>&1 &
exit
要用exit
退出。
2023-03-14 16:48:14
在IOS设备的H5页面上上传视频的时候,会出现自动压缩视频的问题。
经过测试,增加multiple
可以避免这个问题。
2023-01-18 01:11:50
通过 clip-path 来实现。
.test{
border-radius:50%;
border:2px solid red;
clip-path:polygon(50% 0%,100% 0%,100% 100%,50% 100%);
}
2022-12-12 13:41:52
cat /dev/null > access.log
2022-12-09 14:35:04
打开F12 ,按下 ctrl+shift+p
,输入 screen
选择即可。
2022-12-02 16:28:57
通过v2ray创建了一个http的代理,linux服务器想临时用一下,有个服务访问接口总是不通。
export http://username:password@ip:port
然后执行即可。
2022-11-14 16:18:47
将字幕合并到视频中
ffmpeg -i out.mp4 -vf subtitles=zm.srt -y out3.mp4
zm.srt 的格式如下: 时:分:秒,毫秒
1
00:00:30,000 --> 00:00:40,000
这是一个十秒钟的字幕
2
00:00:45,000 --> 00:00:55,000
这是下一个十秒
2022-11-14 15:58:25
文件: 1.mp4 2.mp4 3.mp4
file.txt 如下
file 1.mp4
file 2.mp4
file 3.mp4
ffmpeg -f concat -i file.txt out.mp4
2022-10-31 10:37:36
访问 https://chrunlee.cn/storystatic/static/a.css 实际目录为 /mnt/story/www/static/a.css ,中间的storystatic 没有。
需要用到 alias
而不是 root
.
location ^~ /storystatic/ {
alias /mnt/story/www/;
}
注意 ^
,这个是匹配后不再检索。因为这个问题折腾了半个上午,主要原因是我下面还有其他的static 会匹配到。
2022-10-27 09:05:52
购买后执行以下:
# 安装v2ray 服务端
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
# 启动v2ray
systemctl enable v2ray
systemctl start v2ray
ps -ef|grep v2ray
# 安装x-ui面板
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
# 设置用户名、密码、端口
# 开放x-ui端口及v2ray 端口
firewall-cmd --zone=public --add-port=9999/tcp --permanent
firewall-cmd --zone=public --add-port=40000-50000/tcp --permanent
firewall-cmd --reload
2022-10-14 15:14:36
-- 查询 sort_buffer_size 大小,排序使用内存,如果设置为100M ,有100个连接,则会分配 10G 内存
show global variables like 'sort_buffer_size';
-- 设置为 10M
set global sort_buffer_size=10485760;
-- 查询 join_buffer_size ,join操作使用内存。
show global variables like 'join_buffer_size';
-- 设置为10M
set global join_buffer_size=10485760;
-- 查询最大连接数
show variables like 'max_connections';
-- 查询现成并发数
show variables like 'thread_concurrency';
-- 全局缓存
show variables like 'key_buffer_size';
-- 设置100M
set global key_buffer_size=104857600;
-- innodb_buffer_pool_size
show variables like 'innodb_buffer_pool_size';
-- innodb_log_buffer_size
show variables like 'innodb_log_buffer_size';
set global innodb_log_buffer_size= 10485760;
-- read_buffer_size
show variables like 'read_buffer_size';
set global read_buffer_size=1048576;
-- thread_cache_size
show variables like 'thread_cache_size';
set global thread_cache_size=64;
2022-09-28 16:44:04
ffmpeg -i test.mp3 -af silenceremove=stop_periods=-1:stop_duration=6.5:stop_threshold=-52dB -y test2.mp3
关于dB如何选择,可以用以下命令查看下最大和平均
ffmpeg -i test.mp3 -af volumedetect -f null dummy
生成图片查看
ffmpeg -i test.mp3 -filter_complex "showwavespic=s=1024x768:split_channels=1" -frames:v 1 1.png
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