Skip to content

Instantly share code, notes, and snippets.

View jhxxs's full-sized avatar
🍵
三点几了,饮茶先!

Kyle jhxxs

🍵
三点几了,饮茶先!
View GitHub Profile
@jhxxs
jhxxs / stay-download-all-images.user.js
Last active November 11, 2026 01:57
stay-download-all-images
// ==UserScript==
// @name Download All Images (ZIP)
// @name:zh-CN 打包下载页面全部图片
// @namespace stay-for-safari
// @version 2.0.0
// @description Floating button to pack all <img> images into one ZIP download
// @description:zh-CN 在页面添加浮动按钮,将当前页所有 <img> 打包成一个 ZIP 下载
// @author local
// @match *://*/*
// @run-at document-idle
@jhxxs
jhxxs / Siri-AI.list
Last active November 10, 2026 09:33
Siri-AI
#siri start
# === Siri & Dictation 核心接口 ===
DOMAIN-SUFFIX,guzzoni.apple.com,兜底后备
DOMAIN-SUFFIX,smoot.apple.com,兜底后备
DOMAIN-SUFFIX,siri.apple.com,兜底后备
DOMAIN-SUFFIX,api-siri-prod.apple.com,兜底后备
DOMAIN-SUFFIX,seed-siri-apple-com.v.aaplimg.com,兜底后备
DOMAIN-SUFFIX,nlp.apple.com,兜底后备
DOMAIN-SUFFIX,prod.dss.apple.com,兜底后备
@jhxxs
jhxxs / span-method.ts
Last active November 16, 2022 08:41
spanMethod
interface NetConfigStep {
/* 配网引导内容 */
content: {
[key: string]: string
}
/* 文件地址URL */
file_url: string
id?: number
/* 配网类型,支持 BLE、AP、EZ、ZB、ZBN */
@jhxxs
jhxxs / getBytes.ts
Last active April 4, 2022 12:09
等同于java的String.getBytes方法
function strToUtf8Bytes(str = '') {
const utf8: number[] = [];
for (let i = 0; i < str.length; i++) {
let charCode = str.charCodeAt(i);
if (charCode < 0x80) utf8.push(charCode);
else if (charCode < 0x800) {
utf8.push(0xc0 | (charCode >> 6), 0x80 | (charCode & 0x3f));
} else if (charCode < 0xd800 || charCode >= 0xe000) {
utf8.push(0xe0 | (charCode >> 12), 0x80 | ((charCode >> 6) & 0x3f), 0x80 | (charCode & 0x3f));
} else {
@jhxxs
jhxxs / encrypt.java
Last active March 3, 2022 08:50
数据加密
public static byte[] encrypt(byte[] plain, String key) throws Exception {
if (plain == null) {
throw new Exception("plain cannot be null");
}
if (key == null) {
throw new Exception("key cannot be null");
}