This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
import json | |
stitle = "panel 名称" | |
sexpr = "指标" | |
salert = "告警" | |
def preety_print(dashboard, result): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function search_todo() { | |
# This function will search for TODO items in the file(s) modified by the specified user. | |
# Usage: search_todo <username> [--exclude <pattern>]... [search-dir] | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: search_todo <username> [--exclude <pattern>]... [search-dir]" | |
return 1 | |
fi | |
local USERNAME=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import ( | |
"regexp" | |
) | |
// ExtractTableName from sql statement | |
func ExtractTableName(fromSQL string) (table string) { | |
tableNames := make([]string, 0) | |
reg := "(\\s+FROM\\s+\\`(?P<table1>\\w+)\\`\\s+((\\w+)\\s+)?(WHERE|LEFT|JOIN|INNER|ORDER))|(\\s+JOIN\\s+\\`(?P<table2>\\w+)\\`\\s+((\\w+)\\s+)?ON)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -g "*.new" | rename -vf 's/\.new//' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
需要下载 ffmpeg + jq | |
sudo pacman -S xxx | |
首先测试: | |
cat entry.json | jq .page_data | jq .download_subtitle | sed 's/ //g' | sed 's/\"//g' | sed 's/\;//g' | sed 's/\//-/g' | |
是否获取到视频文件名,如果获取到直接执行下面的 ffmpeg 命令 | |
如果没有:cat entry.json | jq .page_data 后自己找下,文件名在哪 | |
实测,国际版 bilibili,需要使用 | |
ffmpeg -i 64/video.m4s -i 64/audio.m4s -codec copy $(cat entry.json | jq .page_data | jq .part | sed 's/ //g' | sed 's/\"//g' | sed 's/\;//g' | sed 's/\//-/g').mp4 | |
分辨率如果也有不同,就自行修改 |