ffmpeg -sseof -60 -i "input.mp4" -c copy -avoid_negative_ts make_zero "last1min.mp4"-sseof -60:从文件末尾往前定位 60 秒-c copy:不重编码(快,零画质损失)
| # 用淘宝源下载python包进行安装 | |
| v=$1 | |
| wget https://npm.taobao.org/mirrors/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/ | |
| pyenv install $v |
| # --- Terminal / truecolor --- | |
| set -g default-terminal "tmux-256color" | |
| # 注意:terminal-features 匹配的是【外层终端的 TERM】,不是上面的 default-terminal。 | |
| # TERM 不以 xterm 开头的终端(wezterm/foot/alacritty/ghostty)不会命中 xterm* 规则, | |
| # 且 RGB 与 extkeys 会一并静默失效、无任何报错。故预先列出常见项。 | |
| set -as terminal-features ",xterm*:RGB:extkeys" # 含 xterm-256color / xterm-kitty / xterm-ghostty | |
| set -as terminal-features ",alacritty*:RGB:extkeys" | |
| set -as terminal-features ",wezterm*:RGB:extkeys" | |
| set -as terminal-features ",foot*:RGB:extkeys" |
| local function pick(rules, count, random_func) | |
| random_func = random_func or math.random | |
| count = count or 1 | |
| local ret = {} | |
| local total_weight = 0 | |
| for _, v in ipairs(rules) do | |
| local weight = v.weight | |
| total_weight = total_weight + weight | |
| end |
| /* 引入思源黑体和思源宋体 */ | |
| @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap'); | |
| .document-content p, | |
| .document-content body, | |
| .document-content span, | |
| .document-content ul li, | |
| .document-content div { | |
| font-family: 'Noto Serif SC', serif !important; | |
| } |
| " ============================== | |
| " UI & behavior | |
| " ============================== | |
| if has('termguicolors') | |
| set termguicolors | |
| endif | |
| set background=dark | |
| syntax enable |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import clr | |
| clr.AddReference('System') | |
| clr.AddReference('System.Web.Extensions') | |
| from System import Uri | |
| from System.Net import HttpWebRequest | |
| from System.Text import Encoding |