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
script_name = '还原卡拉 OK 特效' | |
script_description = '将字幕恢复到应用卡拉 OK 模板前的状态。' | |
script_author = 'ipid君 <https://github.com/ipid>' | |
script_version = '1.0' | |
--[[ 判断 text 是否以 suffix 为结尾 ]] | |
local function endsWith(text, suffix) | |
return text:sub(-#suffix) == suffix | |
end |
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
from pathlib import Path | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--root', type=Path, default='.') | |
parser.add_argument('--ext', type=str, default='.ts') | |
parser.add_argument('--record', '--archive', '--recording', action='store_true', default=False) | |
parser.add_argument('--out-m3u8', type=Path, default=Path('./list.m3u8')) | |
args = parser.parse_args() |
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
/* | |
使用如下的 aria2 命令行来下载 list.txt 即可: | |
aria2c --all-proxy http://127.0.0.1:7890 --header="cookie: CloudFront-Key-Pair-Id=OVUEIDT7LTF98UIWPOEZ; CloudFront-Policy=A3JTdGF0TcxffroJKiuiuhoyJnbvT9BYU90juitdfjNibVCf5t678ominh89X19XX9; CloudFront-Signature=Uvoe9cjwf9vn00239n8c83398rfn89w8vne048hgn0revm09e4thg8nvmrp0_; MEMBER_ID=2efce3471928379323r2cew3rfdz; TODOFUKEN_CODE=114514" --input-file=list.txt --max-concurrent-downloads=16 --max-connection-per-server=16 --keep-unfinished-download-result=false --auto-file-renaming=false | |
然后使用如下的 ffmpeg 命令行来合并 .ts 分片: | |
ffmpeg -i list.m3u8 -c copy -movflags +faststart out.mp4 |
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 asyncio | |
from asyncio import Future | |
from collections import deque, namedtuple | |
QueueGetResult = namedtuple('QueueGetResult', ['item', 'isOpening']) | |
class CloseableQueue: | |
def __init__(self): | |
# 当前正在等待结果的协程的 Future |
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
#!/bin/bash | |
export CGO_ENABLED=0 | |
if [[ -n "$1" ]]; then | |
LDFLAGS="-X main.Commit=-$(git rev-parse --short HEAD)" | |
else | |
LDFLAGS="" | |
fi | |
go mod download & rm -f build/*.zip & readarray -t goSupported <<< "$(go tool dist list)" |
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 sys | |
from pathlib import Path | |
from argparse import ArgumentParser | |
from dataclasses import dataclass | |
@dataclass | |
class Arguments: | |
upper: bool | |
separator: str |
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
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <cstdint> | |
#include <iostream> | |
#include <memory> | |
#include <gmssl/oid.h> | |
#include <gmssl/sm2.h> |
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
// ==UserScript== | |
// @name 反防复制 + 反监控页面切换 | |
// @namespace https://ipidkun.com | |
// @version 0.1 | |
// @description 用于绕过复制限制的用户脚本。 | |
// @author ipid | |
// @include * | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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
[Interface] | |
Address = 10.0.0.1/24 | |
PrivateKey = ****************************************** | |
ListenPort = 51000 | |
DNS = 223.5.5.5 | |
PostUp = iptables -t nat -F; iptables -t nat -A PREROUTING -p tcp -m multiport --dports 1024:50999,51001:65534 -i eth0 -j DNAT --to-destination 10.0.0.2; iptables -t nat -A PREROUTING -p udp -m multiport --dports 1024:50999,51001:65534 -i eth0 -j DNAT --to-destination 10.0.0.2; iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE | |
PostDown = iptables -t nat -F | |
[Peer] | |
AllowedIPs = 10.0.0.2/32 |
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
// ==UserScript== | |
// @name dblp 按条件隐藏论文 | |
// @namespace https://ipidkun.com | |
// @version 0.1 | |
// @description 隐藏只命中作者的论文,隐藏非 CCF A、CCF B 的论文 | |
// @author ipid | |
// @match *://dblp.org/* | |
// @match *://*.dblp.org/* | |
// @match *://dblp.uni-trier.de/* | |
// @match *://*.dblp.uni-trier.de/* |
NewerOlder