03 2024 档案
摘要:更新: 2024.04.15 如果某个进程不判断捕获异常,使得代码能够继续执行 set appNames to { "WeChat", "QQ"} tell application "System Events" repeat with appName in appNames try set app
阅读全文
摘要:ffmpeg -i input.mp4 -vf 'scale=-1:720,pad=1280:720:(1280-iw)/2:0:black' -c:v libx264 -crf 21 -preset veryfast -aspect 16:9 -c:a copy -f mp4 output.mp4
阅读全文
摘要:正经要用手擀面,但是冰箱里还有一些剩的宽面,只好凑合来了
阅读全文
摘要:select fld_UId,fld_UserName from user where fld_UserName REGEXP '[1]+@[A-Z0-9.-]+.[A-Z]{2,4}$'; A-Z0-9._%- ↩︎
阅读全文
摘要:嗯,很多公司内部oa或者im都加了水印,比如著名阿里月饼事件 brew install fftw brew install imagemagick --with-fftw convert test.jpg -fft fft.png convert mark.png -rotate 180 mark1
阅读全文
摘要:防止ip攻击(补充:配合crontab,比如每10分钟执行一次,假设10分钟内访问次数超过设定阈值的,就可以自动加入nginx的block ip名单中) #!/usr/bin/python #--*coding:utf-8 -*- import re import commands[] import
阅读全文
摘要:需求,在php.ini中设置 allow_domain 参数 格式如下 allow_domain = avc.com,xyz.cn 当php使用file_get_contents($url)时,需要判断url中主机名称是否被allow_domain所包含 在php安装包内找到file_get_con
阅读全文
摘要:!/bin/sh inotifywait -rmq /disk1/ftp MY_SAVEIFS=$IFS IFS=$'\n' path=/disk1/$1/ files=$(ls $path) for file in $files do ret=ffprobe -v error -show_entr
阅读全文
摘要:if [ -n "$line" ]; then //判断字符串是否为空,一定要有双引号 if [ "$PIDS" != "" ]; then//判断字符串是否为空,一定要有双引号 if [ -f $file ]; then // 判断是否是目录 newfile="${file//查询的字符串/替换的
阅读全文
摘要:比如a登陆b,免密码。在a上执行 ssh-keygen -t rsa 三遍回车 ssh-copy-id -i ~/.ssh/id_rsa.pub -p 1522【目标机ip】 输入目标机密码 a就可以免密码登陆b了 如果要增加c服务器了,就直接执行步骤2就可以了
阅读全文
摘要:类似linux下的 ln命令,必须在powershell得管理员模式下就行,如果cmd必须有管理员权限,使用mklink也可以 new-item -itemtype symboliclink -path 要创建得路径 -target 从哪个路径引用
阅读全文
摘要:#!/bin/sh time_out=10 if [ ! -n "$1" ] ;then echo "need to input a script name." exit fi pid_string=`ps -eo pid,etime,comm,args | grep -i "$1" | grep
阅读全文
摘要:fdisk -l 查看硬盘信息 [root@PPlive-RHEL73 ~]# fdisk -l Disk /dev/sda: 146.8 GB, 146815733760 bytes, 286749480 sectors Units = sectors of 1 * 512 = 512 bytes
阅读全文
摘要:要求:将10.200.162.185:/data/www/qq_video mount 到 10.200.162.186:/data/www/qq_video 服务器1 10.200.162.185 #vim /etc/exports /data/www/qq_video 10.200.162.0/
阅读全文
摘要:MOV0001.AVI 436M ffmpeg -y -i MOV00001.AVI -c:v libx264 -crf 30 -preset slow -c:a aac -b:a 44k -ac 2 1.mp4 转换后 130M -preset:指定编码的配置。x264编码算法有很多可供配置的参数
阅读全文
摘要:# xorm reverse mysql "用户名:密码@tcp(数据库ip:端口)/库名?chatset=字符集" 使用本地模版的路径 导出到本地目标的路径 只导出dy_开头的表 xorm reverse mysql "dy_user:8^_DXg2yuMCn@tcp(10.200.146.31:
阅读全文
摘要:sed -i s/"str1"/"str2"/g `grep "str1" -rl --include="*.[ch]" ./` 将当前目录下的所有.c、.h文件中的str1字符串替换为str2字符串。 参数解释: sed: -i 表示操作的是文件,``括起来的grep命令,表示将grep命令的的结
阅读全文
摘要:!/bin/bash 备份路径 db_backup_path="/data/backup" 备份的数据库 db_name=("live_net") 用户名 db_user="root" 密码 db_pass="mysql@abc.net" gzip文件解压缩密码 gz_des_pass="fff@2
阅读全文
摘要:下面以Java 8的安装和配置为例。 Step1: 下载Java安装包 系统:MAC OSX 10.10.1 Java 8安装包:jdk-8u31-macosx-x64.dmg Step2:安装并配置Java环境: (1)打开Shell输入 vi ~/.bash_profile (2) i >输入>
阅读全文
摘要:defaults write com.apple.dock ResetLaunchPad -bool true //重置控制台,可清除无效图标 defaults write com.apple.dock springboard-columns -int 12 defaults write com.a
阅读全文
摘要:$ git init $ git remote add origin https://github.com/zjZSTU/zjzstu.github.com.git $ git fetch origin Test_br_pp_20220510 $ git checkout -b Test_br_pp
阅读全文
摘要:git fetch --all 如果是分支 git reset --hard origin/Test_br_qq_20220510 git reset --hard origin/master git pull
阅读全文
摘要:#!/bin/sh declare -A modules=(["gateway"]="zt-gateway" ["auth"]="zt-auth" ["site"]="zt-modules-site" ["system"]="zt-modules-system" ["chip"]="zt-modul
阅读全文
摘要:apt-get install -y ipmitool 或者: yum install -y ipmitool BMC配置命令 ipmitool lan print 1 #打印当前ipmi 地址配置信息。 ipmitool lan set 1 ipsrc static # 设置 id 1 为静态IP
阅读全文
摘要:创建一个新的文件 vim ~/.gitignore_global 加入忽略匹配规则 # Compiled source .*.swp *.pyc *.com *.class *.dll *.exe *.o *.so # Packages # # it's better to unpack these
阅读全文
摘要:1,武大郎扔砖头,出手就不高。 2,树林子里放风筝,绕住了。 3,小肚子上弦,谈谈心。 4,大方他妈给大方开门,大方到家了;大方他妈夸大方,好大方;把大方放小车上,推大方。 5,正想吃冰,就下冰雹。 6,吃葱吃蒜不吃姜。 7,吃冰棍,拉冰棍,没话儿。 8,麻绳儿穿豆腐,拎不起个儿 9,小孩儿拉屎,挪
阅读全文
摘要:hotel.txt 1,距离川沙公路较近,但是公交指示不对,如果是蔡陆线的话,会非常麻烦 1,商务大床房,房间很大,床有2M宽,整体感觉经济实惠不错! 1,酒店比较新,装潢和设施还不错,只是房间有些油漆味。 0,房间设施还可以,但酒店内非常的冷,冬天不推荐入住。 0,太令人失望了。太差劲了。 0,什
阅读全文
摘要:1.20~50天内修改过的文件 find ./ -mtime +20 -a -mtime -50 -type f 2.按文件大小删除 find ./ -name "*.mp4" -size -100M | xargs -I x sh -c "ls x" |awk '{ sub(/.mp4/,"*")
阅读全文
摘要:2,3,4路视频拼接可以参考下面: https://blog.csdn.net/tianshan2010/article/details/104737576 https://blog.csdn.net/Gary__123456/article/details/88742705 4路拼接【上下左右】:
阅读全文
摘要:最近听评书,发现某些mp3声音真是够小的。 #!/bin/bash # 获取 mean_volume mean_volume=$(ffmpeg -i $1 -filter_complex "volumedetect" -f null /dev/null 2>&1 | sed -n 's/.*mean
阅读全文
摘要:1.查看证书有效期 NAME=static.vas.****.com && echo | openssl s_client -servername $NAME -connect "$NAME":443 2>/dev/null | openssl x509 -noout -dates 2.阿里云申请后
阅读全文
摘要:试用授权文件位于程序配置目录下的 eval 文件夹,程序配置目录如下,将程序配置路径下的 eval 文件夹 重命名或者删除后,重启程序即可。 windows:%userprofile%/AppData/Roaming/JetBrains/产品名版本号 macos: ~/Library/Applica
阅读全文
摘要:Centos8 安装mysql5.7 https://computingforgeeks.com/install-mysql-5-7-on-centos-rhel-linux/ 注意事项 本次使用的是 CentOS7 + MySQL 5.7.32 其他版本的 5.7 MySQL 应该也支持 本次不提
阅读全文
摘要:看这里、看这里 https://github.com/sunfjun/Dockfile-Coreseek
阅读全文
摘要:印象笔记一天比一天垃圾了,没有最垃圾,只有更垃圾。
阅读全文
摘要:1. 创建docker网络 docker network create -d bridge elastic 2. 拉取elasticsearch 8.4.3版本 docker pull elasticsearch:8.4.3 3. 第一次执行docker脚本 docker run -it \ -p
阅读全文
摘要:排序 /bin/netstat -antp|grep :80|awk ' ''{print $5}'|awk -F: '{print $1}'|sort -r|uniq -c|sort -n -k1 -r 计算和 grep "GET" ./live.log |grep "礼物" | awk -F "
阅读全文
摘要:比如我们有一个视频文件,1.mp4,分辨率为720P,也就是1280x720像素。 假如我们想要使用ffmpeg根据1.mp4生成一个小一点分辨率的视频,比如我们想要生成一个640x480的视频文件,我们应该怎么做呢,一句命令行搞定: ffmpeg -i 1.mp4 -vf scale=640:48
阅读全文
摘要:ffmpeg 两路视频平铺 ffmpeg -i src.mp4 -i dst.mp4 -filter_complex "[0:v]pad=iw*2:ih[a];[a][1:v]overlay=w*1" output.mp4 -y 图片转视频 ffmpeg -r 10 -i output/ezgif-
阅读全文
摘要:macos平台下编译 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOARCH=amd64 fyne package -os windows -icon favicon.ico --name test.exe
阅读全文