Last updated: July 22, 2025
| Endpoint Name | path |
|---|
| // | |
| // MacOS Accessibility Notifications | |
| // Notice: this version doesn't take into account new apps after this code is executed | |
| // Created by Phi Hiep Nguyen and AI on 2024-10-08. | |
| // | |
| import Cocoa | |
| import Foundation | |
| // AppObserver: Monitors and reports application activation events on macOS |
| /* | |
| Author: Rudra Roy | |
| Tutodial/Demo: https://www.youtube.com/watch?v=KsMNGolq-Fs | |
| Description: | |
| This script deletes all business chats from WhatsApp Web. | |
| It is usefulsince most business chats are spam and are not useful. | |
| This script is to be run in the console of the WhatsApp Web page. | |
| */ | |
| const contextMenuEvent = new MouseEvent("contextmenu", { |
| /** | |
| * this code is copied from https://github.com/open-wa/wa-decrypt-nodejs | |
| * i just made it more simplified | |
| */ | |
| const { default: axios } = require('axios'); | |
| const crypto = require('crypto'); | |
| const hkdf = require('futoin-hkdf'); | |
| const atob = require('atob'); |
| patch: | |
| # 菜单 | |
| menu: | |
| page_size: 8 # 候选词个数 | |
| # alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签 | |
| # alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键 | |
| # ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml | |
| # 中西文切换 | |
| # | |
| # 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。 |
| import os | |
| os.environ["OPENAI_API_KEY"] = "" | |
| from flask import Flask, Response, request | |
| import threading | |
| import queue | |
| from langchain.chat_models import ChatOpenAI | |
| from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
| from langchain.schema import AIMessage, HumanMessage, SystemMessage |
| const url = 'https://api.example.com/v1/sse'; | |
| const accessToken = 'test'; | |
| fetch(url, { | |
| headers: { | |
| Authorization: `Bearer ${accessToken}`, | |
| }, | |
| }) | |
| .then(response => { | |
| if (response.ok && response.body) { | |
| reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); |
| // The color palette is based on the iOS system colors. | |
| // See: https://developer.apple.com/design/human-interface-guidelines/foundations/color/#system-colors-ios | |
| // All colors are their "default" at level 500, then the shades above / below were generated by | |
| // https://www.tailwindshades.com - except the grays, which are the straight-up iOS system gray colors. | |
| colors: { | |
| transparent: 'transparent', | |
| white: '#ffffff', | |
| black: '#000000', | |
| gray: { | |
| DEFAULT: '#8E8E93', |
Last updated: July 22, 2025
| Endpoint Name | path |
|---|