See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#!/bin/bash | |
tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i) | |
{ | |
if (defined $q) { print "$q\n"; } | |
$q=$_; | |
} else { | |
$_ =~ s/^[ \t]+//; $q.=" $_"; |
#!/bin/bash | |
# Script adbplus | |
# Run any command adb provides on all your currently connected devices, | |
# Or prompt to select one device | |
showHelp() { | |
echo "Usage: adbplus [-a] <command>" | |
echo " -h: show help" | |
echo " -a: run command on all device" | |
echo " command: normal adb commands" |
#define MAKE_PAIR(text) std::pair<std::string, decltype(text)>{#text, text} | |
template<typename T> | |
constexpr static inline auto apply(T const & args) | |
{ | |
return args; | |
} | |
template<typename T, typename T1, typename... Args> | |
constexpr static inline auto apply(T const & t, const T1& first, const Args&... args) | |
{ |
cat /dev/null > ff.txt | |
for i in *.blv; do | |
seq_num="${i%.blv}" # 分段序列号 | |
if [ "${#seq_num}" -eq 1 ]; then | |
# 给文件名添 0 | |
mv "$i" "0$seq_num.flv" | |
else |
$ cat .ssh/config | |
Host * | |
VisualHostKey yes | |
Compression yes | |
ServerAliveInterval 60 | |
#PasswordAuthentication no | |
ControlMaster auto | |
ControlPersist 4800 | |
ControlPath ~/.ssh/control/%r.%h.%p.sock | |
#团队协作Git配置推荐 https://sq.163yun.com/blog/article/197477848982818816 | |
git config --global core.eol lf | |
git config --global core.autocrlf input | |
git config --global core.safecrlf false | |
git config --global core.whitespace trailing-space,space-before-tab,-cr-at-eol | |
git config --global merge.ff only | |
git config --global tag.sort version:refname | |
git config --global log.date iso | |
#使用Tab缩进, 并在修复时将4空格替换为Tab |
brew tap homebrew-ffmpeg/ffmpeg | |
brew install homebrew-ffmpeg/ffmpeg/ffmpeg | |
brew options homebrew-ffmpeg/ffmpeg/ffmpeg | |
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-<option1> --with-<option2> ... | |
#video eg: https://4ksamples.com/puppies-bath-in-4k/ | |
#20s抽一帧 | |
ffmpeg -i PUPPIES_BATH_IN_4K_Original_H.264_AAC.mp4 -f image2 -vf fps=fps=1/20 puppies_%d.png |
#!/bin/bash | |
# Enable RPS (Receive Packet Steering) | |
cc=$(grep -c processor /proc/cpuinfo) | |
end=$(((cc-32)/4)) | |
#rpcc=$(head -c $end < /dev/zero | tr '\0' 'f') | |
#rpcc=$(printf "f%.0s" $(seq $end)) | |
rsfe=32768 | |
count=0 | |
j1=0 | |
j2=0 |