This file contains hidden or 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 extractAdaptiveFormatsInfo(in_formats) { | |
function getStreamType(f) { | |
const mimeType = f.mimeType || ''; | |
if (mimeType.startsWith('audio/')) return 'audio'; | |
if (mimeType.startsWith('video/')) { | |
if (f.audioChannels && f.audioChannels > 0) { | |
return 'video+audio'; | |
} | |
return 'video'; | |
} |
This file contains hidden or 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
#!/bin/bash | |
# 显示本bash脚本收到的完整参数 | |
echo "此脚本文件接收到的来自终端的所有参数: $@" | |
script=$(readlink -f "$0") |
This file contains hidden or 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
#!/bin/bash | |
arr_tab_run_cmd=("$@") | |
nargs=${#arr_tab_run_cmd[@]} | |
terminal_args=(--window) | |
for ((i=0; i<nargs; i++)); do | |
if [ $i -eq 0 ]; then | |
echo "第一个tab: ${arr_tab_run_cmd[$i]}" |
This file contains hidden or 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
#!/bin/bash | |
# https://docs.github.com/zh/rest/actions/workflows#create-a-workflow-dispatch-event | |
echo -n "Enter GitHub token: " | |
# Disable echo. | |
stty -echo | |
read token |
This file contains hidden or 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
user_pref("browser.bookmarks.defaultLocation", "unfiled_____"); | |
user_pref("browser.quitShortcut.disabled", true); // disable Ctrl-Q quit shortcut [LINUX] [MAC] [FF87+ | |
// user_pref("mousewheel.default.delta_multiplier_y", 250); //鼠标滚轮速度(旧) | |
user_pref("mousewheel.system_scroll_override.vertical.factor", 250); //鼠标滚轮速度 | |
user_pref("browser.tabs.closeWindowWithLastTab", false); // 最后一个标签不关闭浏览器 | |
user_pref("browser.tabs.insertAfterCurrent", true); // 在目前标签后插入新标签 | |
user_pref("browser.tabs.loadBookmarksInBackground", true); // 后台打开书签 | |
user_pref("browser.tabs.loadBookmarksInTabs", true); | |
user_pref("browser.tabs.loadDivertedInBackground", true); | |
user_pref("browser.urlbar.trimURLs", false); //不隐藏部分url |
This file contains hidden or 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
sudo capsh --caps='cap_net_bind_service+eip cap_setpcap,cap_setuid,cap_setgid+ep' \ | |
--keep=1 --user=non-root-user --addamb=cap_net_bind_service -- \ | |
-c '/path/to/your/command' |
This file contains hidden or 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
patch: | |
"preset_keyboards/wubi86_double_key": #佈局ID | |
name: "五笔双键键盘" #方便自己辨識的名字 | |
ascii_mode: 0 #默認進入中文狀態 | |
height: 30 #每行高度 | |
width: 20 #按鍵默認寬度(取所有按鍵中用得較多的寬度值,接下來就可以少寫一些width了) | |
# label_transform: uppercase #uppercase|none 中文模式下的字母標籤自動大寫 | |
lock: true | |
main_keys_text_size: &TS | |
18 |
This file contains hidden or 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
These is used by KDE theme. Make sure they are installed from main repo. Don't use obs repo one. | |
libimobiledevice | |
libplist | |
ifuse |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# usage: | |
# env mail_acc="aaa@bbb.ccc" env mail_pswd="xxx" env mail_title="Hi~" env mail_content="Hello~" smtp2self | |
import sys | |
import os | |
import logging | |
logging.basicConfig(level=logging.DEBUG) |
This file contains hidden or 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
#!/bin/bash | |
PARAS="$@" | |
TEXT="是否复制以下内容?" | |
if [[ "$PARAS" ]] ; then | |
TEXT="$TEXT\n$PARAS" | |
fi | |
NewerOlder