摘要:
正经要用手擀面,但是冰箱里还有一些剩的宽面,只好凑合来了 阅读全文
摘要:
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 阅读全文