纯sql实现mysql计算两个时间的时间间隔,排除周末。其实就是计算工作日的实际用时(这里不涉及节假日)。
假设起始时间是
start_time
, 结束时间是end_time
将起始时间到结束时间这个时间窗口分成四部分
- 完整的x周(x>=0)
- 一周内的天数
- 起始时间到起始日期那天24点的用时
Reference: https://www.youtube.com/watch?v=qOrlYzqXPa8
Say some text by tts.
say "xxx"
Reference: https://github.com/kvaps/kubectl-node-shell
Usage: ./kubectl-node-shell <node-name>
Reference: https://github.com/jordanwilson230/kubectl-plugins
Principle: Create a ssh-pod with /var/run/docker.sock
mounted. Then exec target pod through the ssh-pod which has docker privilege.
Usage: ./kubectl-exec-as-root <pod-name> -- bash