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
# Disable XON/XOFF | |
[[ $- == *i* ]] && stty -ixon |
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
""" | |
Generate AIDA64 key. | |
AIDA64 download link, edition and version can be changed: | |
https://download.aida64.com/aida64business750.zip | |
""" | |
import random | |
from datetime import datetime, timezone | |
from enum import Enum |
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
export default { | |
/** | |
* Send request to this API with querys param "url" and "apikey" | |
* @param {Request} request | |
* @param {*} env | |
* @param {*} ctx | |
* @returns Response | |
*/ | |
async fetch(request, env, ctx) { | |
const supportMethods = new Set(['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH']); |
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
export default { | |
async fetch(request, env, ctx) { | |
const DEEPL_BASE_URL = 'https://www2.deepl.com/jsonrpc'; | |
const DEEPLX_TOKEN = env.DEEPLX_TOKEN; | |
const headers = new Headers({ | |
'Content-Type': 'application/json', | |
'Accept': '*/*', | |
'x-app-os-name': 'iOS', | |
'x-app-os-version': '16.3.0', | |
'Accept-Language': 'en-US,en;q=0.9', |
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
""" | |
Generate wireguard config from cloudflare zero trust | |
Credit to https://gitlab.com/Misaka-blog/warp-script | |
""" | |
import datetime | |
import json | |
import random | |
import string | |
from urllib import request |
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
""" | |
Test cloudflare WARP endpoints | |
Select all the best WARP endpoints | |
Thanks to https://gitlab.com/Misaka-blog/warp-script#warp-endpoint-ip-优选脚本 | |
""" | |
import asyncio | |
import csv | |
import ipaddress | |
import logging |
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
/// Cloudflare Worker script for Genshin Impact Daily Check-In | |
/// LTUID, LTOKEN must be set for check-in | |
/// TELEGRAM_CHAT_ID, TELEGRAM_BOT_TOKEN may be set for messaging | |
const CHECK_IN_URL = "https://hk4e-api-os.mihoyo.com/event/sol/sign?act_id=e202102251931481"; | |
async function handleScheduled(request) { | |
const headers = new Headers(); | |
headers.set("Cookie", `ltuid=${LTUID}; ltoken=${LTOKEN};`); | |
headers.set( |
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
/** | |
* @file BiliRoaming Alibaba Cloud FC Node.js script, need a layer with "axios" | |
* @author thanksshu | |
* @license MIT | |
*/ | |
'use strict'; | |
const axios = require('axios').default; | |
const TARGET_URL = 'https://api.bilibili.com'; |
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
# Auto completion | |
set completion-ignore-case on | |
set show-all-if-ambiguous on | |
set show-all-if-unmodified on | |
set menu-complete-display-prefix on | |
"\t": menu-complete | |
"\e[Z": menu-complete-backward # Shift + Tab |
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
# replacement strings | |
WINDOWS_LINE_ENDING = b'\r\n' | |
UNIX_LINE_ENDING = b'\n' | |
# relative or absolute file path, e.g.: | |
file_path = r'file_path' | |
with open(file_path, 'rb') as fs: | |
content = fs.read() | |