- 前端编程助手
- 中英文互译
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Claude Configuration Manager - Simplified and Optimized | |
Manages API configurations for Claude with multiple presets support. | |
""" | |
import argparse | |
import json | |
import os | |
import sys |
This file contains hidden or 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
param( | |
[string]$githubMirror | |
) | |
$installScript = irm bun.sh/install.ps1 | |
if ($githubMirror) { | |
$parsedURL = '$BaseURL = "https://' + $githubMirror + '/oven-sh/bun/releases"' | |
$installScript = $installScript -replace '\$BaseURL = "https://github.com/oven-sh/bun/releases"', $parsedURL | |
} |
This file contains hidden or 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 { createUnplugin } from 'unplugin' | |
import type { TransformOptions } from './plugin' | |
const methodRegexWithSemicolon = (methodName: string, tail = '') => new RegExp(`${methodName}\\(([^)]*)\\) \\{[\\s\\S]*?;[\\s\\S]*?}${tail}`, 'gm') | |
const methodRegexWithoutSemicolon = (methodName: string) => new RegExp(`${methodName}\\(([^)]*)\\) \\{(?:[^{}]*(?:\\{(?:[^{}]*(?:\\{[^{}]*\\})?)*\\})?)*[^{}]*\\}`, 'gm') | |
/** | |
* trim kysely method or class names |
This file contains hidden or 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
# Get editor completions based on the config schema | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# Inserts a blank line between shell prompts | |
add_newline = true | |
[character] | |
success_symbol = '[>](bold green)' | |
error_symbol = '[✗](bold red)' |
This file contains hidden or 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
$hostsFilePath = "C:\Windows\System32\drivers\etc\hosts" | |
$tempFilePath = "C:\hosts.txt" | |
$url = "https://raw.hellogithub.com/hosts" | |
$startLine = "# GitHub520 Host Start" | |
$endLine = "# GitHub520 Host End" | |
# Check if the line exists in the hosts file | |
$lineExists = Select-String -Path $hostsFilePath -Pattern $startLine -Quiet | |
# If the line exists, remove the old segment |
This file contains hidden or 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
// Small wasm program that exposes the `ctz` instruction. | |
// https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/Numeric/Count_trailing_zeros | |
const wasmBuf = new Uint8Array([ | |
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, | |
0x7f, 0x01, 0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0d, 0x01, 0x09, 0x74, 0x72, | |
0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x30, 0x00, 0x00, 0x0a, 0x07, 0x01, 0x05, | |
0x00, 0x20, 0x00, 0x68, 0x0b, 0x00, 0x0f, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x02, | |
0x08, 0x01, 0x00, 0x01, 0x00, 0x03, 0x6e, 0x75, 0x6d, | |
]); |
This file contains hidden or 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 hidden or 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
{ | |
"$schema": "./node_modules/rome/configuration_schema.json", | |
"organizeImports": { | |
"enabled": false | |
}, | |
"linter": { | |
"enabled": true, | |
"rules": { | |
"recommended": true, | |
"style": { |