diff --git a/commands/cmd_jupyter b/commands/cmd_jupyter new file mode 100644 index 0000000..0626241 --- /dev/null +++ b/commands/cmd_jupyter @@ -0,0 +1,10 @@ +# 启动 jupyter notebook 服务 +jupyter notebook +# 启动 jupyter notebook 服务,并制定端口号 +jupyter notebook --port +# 将 ipynb 转为 html 格式 +jupyter nbconvert .ipynb +# 将 ipynb 转为 html 格式,并指定输出目录 +jupyter nbconvert .ipynb --output-dir= +# 将 ipynb 转为 html 格式,并指定输出名称 +jupyter nbconvert .ipynb --output= diff --git a/commands/cmd_mysql b/commands/cmd_mysql new file mode 100644 index 0000000..4ca81c8 --- /dev/null +++ b/commands/cmd_mysql @@ -0,0 +1,10 @@ +# 查询 processlist +show processlist; +# 查询 processlist +select * from information_schema.processlist; +# 按客户端 IP 分组,看哪个客户端的链接数最多 +select client_ip,count(client_ip) as client_num from (select substring_index(host,':' ,1) as client_ip from information_schema.processlist ) as connect_info group by client_ip order by client_num desc; +# 查看正在执行的线程,并按 Time 倒排序,看看有没有执行时间特别长的线程 +select * from information_schema.processlist where Command != 'Sleep' order by Time desc; +# 找出所有执行时间超过 5 分钟的线程,拼凑出 kill 语句 +select concat('kill ', id, ';') from information_schema.processlist where Command != 'Sleep' and Time > 300 order by Time desc; diff --git a/icon/jupyter.png b/icon/jupyter.png new file mode 100644 index 0000000..253c89a Binary files /dev/null and b/icon/jupyter.png differ diff --git a/icon/mysql.png b/icon/mysql.png new file mode 100644 index 0000000..734ba48 Binary files /dev/null and b/icon/mysql.png differ diff --git a/info.plist b/info.plist index fc1161c..75ab1d2 100644 --- a/info.plist +++ b/info.plist @@ -460,28 +460,23 @@ config - concurrently - - escaping - 102 - script - $@ | while read line -do - echo $line -done - scriptargtype - 1 - scriptfile - - type + argumenttype 0 + keyword + run + subtext + + text + 执行命令并得到结果 + withspace + type - alfred.workflow.action.script + alfred.workflow.input.keyword uid - AEEE997C-352F-4019-BFEF-40480C5770E9 + 0FA3CA6F-AB00-446F-95B9-EAB309AA7AD4 version - 2 + 1 config @@ -507,23 +502,28 @@ done config - argumenttype - 0 - keyword - run - subtext + concurrently + + escaping + 102 + script + $@ | while read line +do + echo $line +done + scriptargtype + 1 + scriptfile - text - 执行命令并得到结果 - withspace - + type + 0 type - alfred.workflow.input.keyword + alfred.workflow.action.script uid - 0FA3CA6F-AB00-446F-95B9-EAB309AA7AD4 + AEEE997C-352F-4019-BFEF-40480C5770E9 version - 1 + 2 config @@ -775,7 +775,7 @@ echo -n $(nohup curl $1 -O &) variablesdontexport version - 2020.06.01 + 2020.06.03 webaddress https://github.com/wxnacy/alfred-commands-workflow