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
// Cloudflare Images 鉴权API文档 | |
// https://developers.cloudflare.com/images/cloudflare-images/api-request/ | |
const CF_IMAGES_ACCOUNT_ID: string = "<账号ID>"; | |
const CF_IMAGES_API_KEY: string = "<CLOUDFLARE IMAGES API KEY>"; | |
const CF_IMAGES_BUCKET_NAME: string = "<账号HASH>"; | |
// 白名单域名 |
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 os | |
import re | |
import hashlib | |
# 设定工作目录 | |
DIR = "/Volumes/Desktop" | |
def calculate_hash(filepath): | |
hasher = hashlib.sha256() | |
with open(filepath, 'rb') as f: |
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
git filter-branch --env-filter ' | |
OLD_NAME="old_name" | |
OLD_EMAIL="[email protected]" | |
CORRECT_NAME="luolei" | |
CORRECT_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_NAME" = "$OLD_NAME" ] && [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi |
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
rule-providers: | |
reject: | |
type: http | |
behavior: domain | |
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt" | |
path: ./ruleset/reject.yaml | |
interval: 86400 | |
icloud: | |
type: http |
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
// 通过 Cloudflare Worker 批量打包和下载现存文件 | |
// curl -X POST https://your-worker-endpoint/create-zip \ | |
// -H "Authorization: Bearer YOUR_AUTH_SECRET" \ | |
// -H "Content-Type: application/json" \ | |
// -d '{ | |
// "filePaths": [ | |
// "path/to/file1.jpg", | |
// "path/to/file2.png", | |
// "path/to/file3.pdf" | |
// ] |
OlderNewer