Skip to content

Instantly share code, notes, and snippets.

View subframe7536's full-sized avatar
🎯
Focusing

Song subframe7536

🎯
Focusing
View GitHub Profile
@subframe7536
subframe7536 / cc_manager.py
Last active August 30, 2025 18:21
Claude Code Env Manager
#!/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
@subframe7536
subframe7536 / bun_install.ps1
Created August 24, 2024 11:23
Powershell script to custom github mirror for bun download / upgrade
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
}
@subframe7536
subframe7536 / unplugin-kysely.ts
Last active April 16, 2024 08:58
unplugin for Kysely and SQLite
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
@subframe7536
subframe7536 / 个人提示词列表.md
Last active August 17, 2025 15:15
提示词列表
  • 前端编程助手
  • 中英文互译
@subframe7536
subframe7536 / config.toml
Last active June 4, 2025 03:12
Starship.rs config
# 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)'
@subframe7536
subframe7536 / hosts.ps1
Last active January 29, 2024 13:15
Github Hosts Update Script For Windows
$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
@subframe7536
subframe7536 / bitset.js
Created October 12, 2023 00:50
Bitset from Parcel
// 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,
]);
@subframe7536
subframe7536 / default.custom.yaml
Created August 24, 2023 11:27 — forked from lewangdev/default.custom.yaml
雾凇拼音自定义配置,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 切换到大写或切换中英。
@subframe7536
subframe7536 / rome.json
Created July 23, 2023 02:22
self use config for Rome
{
"$schema": "./node_modules/rome/configuration_schema.json",
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {