Skip to content

Instantly share code, notes, and snippets.

@oneleo
oneleo / myahk_王國之心三_連點攻擊.ahk
Last active January 27, 2026 04:31
AutoHotKeyV2_王國之心三_連點攻擊
; ========================================================
; AutoHotkey 腳本:王國之心三自動連點攻擊
; 使用說明:
; 1. 使用 Chocolatey 安裝 AutoHotKeyV2: choco install -y autohotkey.portable
; 2. 請將這份文字保存至 "D:\Users\Public\Documents\AutoHotkey\myahk_王國之心三_連點攻擊.ahk"
; 3. 開啟 AutoHotkey 請用 CMD.exe 執行以下指令:
; "%ProgramData%\chocolatey\lib\autohotkey.portable\tools\AutoHotkey.exe" "D:\Users\Public\Documents\AutoHotkey\myahk_王國之心三_連點攻擊.ahk"
; 4. 請截一張 512*512 大小的圖片,此圖片為在戰鬥結束時出現約 3 秒的全白畫面,並命名為 "D:/Users/Public/Documents/AutoHotkey/end.bmp"
; 5. 請在進到戰鬥傳送門,且戰鬥開始後再按 F8 啟動腳本,並在需要時按下 F9 以停止腳本
; ========================================================

在 Mainnet 設置反向 Addr 解析(L1 addr → name)

sequenceDiagram
    actor A as Aruun
    box White Mainnet
        participant E as ENS Registry
        participant V as L1 Reverse Registrar
    end
@oneleo
oneleo / UniversalResolver.md
Created December 22, 2025 16:10
ENS Universal Resolver 查詢㳘程
@oneleo
oneleo / userOperation.tsx
Created May 20, 2024 07:30
estimateGasLimit
// ...
function UserOperationConfirmation(props: { userOpLog: UserOperationLog }) {
// ...
// TODO: Put it into a dedicated module
const estimateGasFee = async () => {
const fee = await provider.getFeeData()
const gasPriceWithBuffer = (fee.gasPrice * 120n) / 100n
@oneleo
oneleo / index.ts
Last active April 30, 2024 10:23
Background Main
const fetchData = async () => {
const fetchUserOpsSent = async () => {
const s = storage.get()
const nm = new NetworkStorageManager(storage)
const bundler = nm.getActive().bundler
const bundlerProvider = new JsonRpcProvider(bundler.url)
console.log(
`[ttt] storage userOp: ${json.stringify(s.userOpPool, null, 2)}`
)
const userOps = Object.values(s.userOpPool)
// ...
import { type State } from "~background/storage"
import {
AccountType,
getStorage,
setStorageTest,
type Account
@oneleo
oneleo / p256.ts
Last active December 26, 2023 10:07
Secp256r1
import { AbiCoder } from "ethers";
import { readFileSync } from "fs";
import { p1363ToDer } from "./ecdsa-utils";
const userOpHash = process.argv[2];
const ethersAbi = AbiCoder.defaultAbiCoder();
const fido2Credential = JSON.parse(
readFileSync("test/ffi/bitwarden_export_20231219124736.json", "utf-8"),
@oneleo
oneleo / Test.md
Created October 27, 2023 07:38
Test

Here is a simple flow chart:

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
@oneleo
oneleo / settings.json
Last active September 10, 2023 11:34
Visual Studio Code Settings
{
// 同步更新至:https://gist.github.com/oneleo/780d90384b6444e504b8a7b2fc49f9e5
// -----------------------------
// ----------- VSCode -----------
// -----------------------------
// 滑鼠點選其他分頁時,舊分頁自動存檔
"files.autoSave": "onFocusChange",
// 調整字體大小
"editor.fontSize": 15,
// 文字超過螢幕自動挪到下一行
@oneleo
oneleo / remapLRShift.json
Created August 5, 2023 01:26
karabiner-elements: perfect solution while changing language inputs between EN and ZH (Location: ${HOME}/.config/karabiner/assets/complex_modifications/)
{
"title": "LR_Shift to Ctrl+Space",
"rules": [
{
"description": "Change L_Shift to switch EN/ZH condition",
"manipulators": [
{
"type": "basic",
"conditions": [
{