The Composable Architecture (简写为TCA) 让你用统一、便于理解的方式来搭建应用程序,它兼顾了组装,测试,以及功效。你可以在 SwiftUI,UIKit,以及其他框架,和任何苹果的平台(iOS、macOS、tvOS、和 watchOS)上使用 TCA。
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
// | |
// 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 |
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
/* | |
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 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
/** | |
* 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'); |
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
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 切换到大写或切换中英。 |
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 | |
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 |
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
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(); |
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
// 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', |
A Pen by Matt Daniel Brown on CodePen.
NewerOlder