Skip to content

Instantly share code, notes, and snippets.

@hiepnp1990
hiepnp1990 / accessibility_notifications.swift
Created October 10, 2024 13:55
MacOS Accessibility API Notifications
//
// 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
@astrarudra
astrarudra / whatsapp-delete-ads-business-chats.js
Last active July 1, 2024 01:16
WhatsApp - Delete Ads/Business Chats (No App, No Root - Only Browser) - This script deletes all business chats from WhatsApp Web. It is useful since most business chats are spam and are not useful. This script is to be run in the console of the WhatsApp Web page.
/*
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", {
@Gimenz
Gimenz / wa-decrypt.js
Created May 6, 2023 03:30
a function to decrypt WA Media
/**
* 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');
@lewangdev
lewangdev / default.custom.yaml
Last active October 30, 2025 03:46
雾凇拼音自定义配置,MacOS-like & Wechat-like Dark/Light Color Scheme For Rime
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 切换到大写或切换中英。
@python273
python273 / app.py
Last active December 29, 2024 23:37
Flask Streaming Langchain Example
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
@blackbing
blackbing / fetchStream.js
Last active September 1, 2024 08:05
Server Sent Event with fetch stream
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();
@gbuckingham89
gbuckingham89 / tailwind.config.js
Last active November 30, 2024 03:47
iOS system colors for TailwindCSS
// 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',
@hackermondev
hackermondev / api endpoints.md
Last active November 26, 2025 13:34
discord api endpoints

List of every single Discord API endpoint used on the client

Last updated: July 22, 2025

https://discord.com/api/v9

Endpoint Name path
@strobelt
strobelt / install_neovim.sh
Last active October 28, 2025 05:36
Install latest NeoVim in Debian
# Download latest neovim release from GitHub releases and pipe it to tar to extract it to /usr
curl -sL https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz \
| sudo tar -xzf - --strip-components=1 --overwrite -C /usr
@sh3l6orrr
sh3l6orrr / TCA_zh.md
Last active November 7, 2025 13:39
TCA

The Composable Architecture (可组装架构)

The Composable Architecture (简写为TCA) 让你用统一、便于理解的方式来搭建应用程序,它兼顾了组装,测试,以及功效。你可以在 SwiftUI,UIKit,以及其他框架,和任何苹果的平台(iOS、macOS、tvOS、和 watchOS)上使用 TCA。