Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
Always respond in Chinese-simplified
|
||||
|
||||
有任何拿不定主意、不确定的地方、或者某些细节都需要使用AskUserQuestion询问我
|
||||
|
||||
# CRITICAL: File Editing on Windows
|
||||
|
||||
## ⚠️ MANDATORY: Always Use Backslashes on Windows for File Paths
|
||||
|
||||
**When using Edit or MultiEdit tools on Windows, you MUST use backslashes (`\`) in file paths, NOT forward slashes (`/`).**
|
||||
**When using Edit or MultiEdit tools on Windows, you MUST use absolute paths, NOT relative paths.**
|
||||
|
||||
### ❌ WRONG - Will cause errors:
|
||||
|
||||
```
|
||||
Edit(file_path: "D:/repos/project/file.tsx", ...)
|
||||
Edit(file_path: "file.tsx", ...)
|
||||
MultiEdit(file_path: "D:/repos/project/file.tsx", ...)
|
||||
MultiEdit(file_path: "file.tsx", ...)
|
||||
```
|
||||
|
||||
### ✅ CORRECT - Always works:
|
||||
|
||||
```
|
||||
Edit(file_path: "D:\repos\project\file.tsx", ...)
|
||||
MultiEdit(file_path: "D:\repos\project\file.tsx", ...)
|
||||
```
|
||||
@@ -0,0 +1,29 @@
|
||||
```PowerShell
|
||||
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "http://8.162.2.152/claude", [System.EnvironmentVariableTarget]::User)
|
||||
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-xxxx", [System.EnvironmentVariableTarget]::User)
|
||||
```
|
||||
|
||||
mcp
|
||||
|
||||
```
|
||||
claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: ctx7sk-21884782-852a-4ef8-8f26-83cd9b8c7d30" --scope user
|
||||
|
||||
|
||||
{
|
||||
"morecup-context": {
|
||||
"type": "stdio",
|
||||
"command": "cmd",
|
||||
"args": [
|
||||
"/c",
|
||||
"npx",
|
||||
"-y",
|
||||
"morecup-context",
|
||||
"-gateway",
|
||||
"http://8.162.2.152"
|
||||
],
|
||||
"env": {
|
||||
"MORECUP_AI_API_KEY": "sk-xxxx"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,32 @@
|
||||
```
|
||||
[mcp_servers]
|
||||
[mcp_servers.context7-mcp]
|
||||
command = "cmd"
|
||||
startup_timeout_sec = 30
|
||||
env = { SystemRoot = "C:\\Windows" }
|
||||
args = [
|
||||
"/c",
|
||||
"npx",
|
||||
"-y",
|
||||
"@upstash/context7-mcp",
|
||||
"--api-key",
|
||||
"ctx7sk-21884782-852a-4ef8-8f26-83cd9b8c7d30",
|
||||
]
|
||||
|
||||
[mcp_servers.desktop-commander]
|
||||
command = "cmd"
|
||||
startup_timeout_sec = 30
|
||||
env = { SystemRoot = "C:\\Windows" }
|
||||
args = ["/c", "npx", "-y", "@wonderwhy-er/desktop-commander"]
|
||||
```
|
||||
|
||||
```
|
||||
aicodemirror
|
||||
{
|
||||
"OPENAI_API_KEY": "sk-ant-api03-Cb_9GtneUAuhHoCc26E-1MPF422fmWAVeLlW3BJHCYzUj9IoCxmImoZnHSeIBEfH4DRSXEny03N2f6QCUuYlwA"
|
||||
}
|
||||
packycode
|
||||
{
|
||||
"OPENAI_API_KEY": "sk-pJixdYiaLXi7LFb15bLdh1HyQ75nbgYs"
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,158 @@
|
||||
```PowerShell
|
||||
#----------------------------------------------------------------------
|
||||
# 控制台输出编码设置为 UTF-8
|
||||
#----------------------------------------------------------------------
|
||||
[Console]::InputEncoding = [System.Text.Encoding]::UTF8
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# PSReadLine 配置
|
||||
#----------------------------------------------------------------------
|
||||
if ($Host.Name -eq 'ConsoleHost' -and $Host.UI.SupportsVirtualTerminal) {
|
||||
try {
|
||||
# --- 预测与补全 ---
|
||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
||||
Set-PSReadLineOption -PredictionViewStyle ListView
|
||||
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
|
||||
# --- 历史记录优化 ---
|
||||
Set-PSReadLineOption -HistoryNoDuplicates
|
||||
Set-PSReadLineOption -MaximumHistoryCount 10000
|
||||
}
|
||||
catch {
|
||||
Write-Verbose "PSReadLine 配置未生效: $($_.Exception.Message)"
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 自定义快捷命令
|
||||
#----------------------------------------------------------------------
|
||||
function ep { code $PROFILE }
|
||||
function vim { nvim $args }
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 查找并可选择性删除当前目录及子目录下的所有空文件夹。
|
||||
# - 会自动忽略 .git 目录。
|
||||
# - 解决了嵌套空目录的删除顺序问题。
|
||||
# - 支持 -WhatIf 和 -Confirm 安全参数。
|
||||
# - 遵循 PowerShell 最佳实践。
|
||||
#----------------------------------------------------------------------
|
||||
function Get-EmptyDirectory {
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
|
||||
[string]$Path = ".",
|
||||
[Switch]
|
||||
[Alias('d')]
|
||||
$Delete
|
||||
)
|
||||
|
||||
# 要忽略的目录名称列表
|
||||
$ignoreDirs = @(".git", ".idea", ".vscode", "node_modules", "dist")
|
||||
|
||||
# 1. 获取所有目录,递归排除 ignoreDirs
|
||||
$emptyDirs = Get-ChildItem -Path $Path -Recurse -Directory -ErrorAction SilentlyContinue |
|
||||
Where-Object {
|
||||
# 当前目录是否属于忽略名单
|
||||
$name = $_.Name.ToLower()
|
||||
if ($ignoreDirs -contains $name) { return $false }
|
||||
|
||||
$lowerPath = $_.FullName.ToLower()
|
||||
if ($lowerPath -match 'node_modules|dist') { return $false }
|
||||
|
||||
# 是否为空目录
|
||||
-not $_.GetFileSystemInfos()
|
||||
}
|
||||
|
||||
# 2. 按路径长度降序排列,保证先删除子目录
|
||||
$sortedEmptyDirs = $emptyDirs | Sort-Object { $_.FullName.Length } -Descending
|
||||
|
||||
foreach ($dir in $sortedEmptyDirs) {
|
||||
# 输出管道对象
|
||||
Write-Output $dir
|
||||
|
||||
if ($Delete) {
|
||||
if ($PSCmdlet.ShouldProcess($dir.FullName, "Delete Empty Directory")) {
|
||||
Remove-Item -LiteralPath $dir.FullName -Force
|
||||
Write-Host "Deleted empty directory: $($dir.FullName)" -ForegroundColor Green
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Set-Alias -Name fempty -Value Get-EmptyDirectory
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 函数: Get-GitCodeLines
|
||||
#----------------------------------------------------------------------
|
||||
#
|
||||
# 用法 1(默认统计当前 Git 仓库,当前用户,最近 30 天):
|
||||
# Get-GitCodeLines
|
||||
#
|
||||
# 用法 2(指定具体日期范围):
|
||||
# Get-GitCodeLines -Author "zhangsan" -Since "2025-01-01" -Until "2025-06-30"
|
||||
#
|
||||
function Get-GitCodeLines {
|
||||
param (
|
||||
[string]$Author = "$(git config user.name)",
|
||||
[string]$Since, # yyyy-MM-dd
|
||||
[string]$Until # yyyy-MM-dd
|
||||
)
|
||||
|
||||
# 检查是否在 Git 仓库中
|
||||
if (-not (Test-Path ".git")) {
|
||||
Write-Host "❌ 当前目录不是 Git 仓库。" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
# 若未提供日期,则使用最近 30 天
|
||||
if (-not $Since) {
|
||||
$Since = (Get-Date).AddDays(-30).ToString("yyyy-MM-dd")
|
||||
}
|
||||
if (-not $Until) {
|
||||
$Until = (Get-Date).ToString("yyyy-MM-dd")
|
||||
}
|
||||
|
||||
Write-Host "📊 正在统计 $Author 从 $Since 到 $Until 的代码变动..." -ForegroundColor Cyan
|
||||
|
||||
$log = git log `
|
||||
--since=$Since `
|
||||
--until=$Until `
|
||||
--author=$Author `
|
||||
--pretty=tformat: `
|
||||
--numstat
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "❌ git log 执行失败,请检查参数。" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
if (-not $log) {
|
||||
Write-Host "⚠️ 该时间段内无提交记录。" -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
|
||||
$added = 0
|
||||
$deleted = 0
|
||||
|
||||
foreach ($line in $log) {
|
||||
if ($line -match "^\d+\s+\d+") {
|
||||
$cols = $line -split "\s+", 3
|
||||
$added += [int]$cols[0]
|
||||
$deleted += [int]$cols[1]
|
||||
}
|
||||
}
|
||||
|
||||
$net = $added - $deleted
|
||||
$total = $added + $deleted
|
||||
|
||||
Write-Host "✅ 作者: $Author" -ForegroundColor Green
|
||||
Write-Host "📆 时间范围: $Since ~ $Until"
|
||||
Write-Host "🟢 增加: $added 行"
|
||||
Write-Host "🔴 删除: $deleted 行"
|
||||
Write-Host "🔵 净增: $net 行" -ForegroundColor $(if ($net -gt 0) { "Green" } elseif ($net -lt 0) { "Red" } else { "Gray" })
|
||||
Write-Host "📈 总变动: $total 行"
|
||||
}
|
||||
|
||||
Set-Alias singbox "D:\MyCode\netbox\sing-box\singbox.ps1"
|
||||
|
||||
```
|
||||
@@ -0,0 +1,70 @@
|
||||
[RIME | 中州韻輸入法引擎](https://rime.im/)
|
||||
|
||||
[amzxyz/rime_wanxiang: Rime万象拼音输入方案](https://github.com/amzxyz/rime_wanxiang)
|
||||
|
||||
my_dict.dict.yaml
|
||||
|
||||
```
|
||||
---
|
||||
name: my_dict
|
||||
version: "1.0"
|
||||
sort: by_weight
|
||||
...
|
||||
李春良 lǐ chūn liáng 500
|
||||
石正 shí zhèng 500
|
||||
张鹏豪 zhāng péng háo 500
|
||||
崔晓宇 cuī xiǎo yǔ 500
|
||||
黄寅杰 huáng yín jié 500
|
||||
白寰宇 bái huán yǔ 500
|
||||
刘衍君 liú yǎn jūn 500
|
||||
|
||||
```
|
||||
|
||||
my_phrase.txt
|
||||
|
||||
```
|
||||
docker7530@gmail.com yx 1
|
||||
|
||||
```
|
||||
|
||||
wanxiang.custom.yaml
|
||||
|
||||
```
|
||||
patch:
|
||||
speller/algebra:
|
||||
__patch:
|
||||
- wanxiang_algebra:/base/自然码
|
||||
custom_phrase/user_dict: my_phrase
|
||||
translator/packs/+:
|
||||
- my_dict
|
||||
tips/disabled_types:
|
||||
- 表情
|
||||
|
||||
```
|
||||
|
||||
.gitignore
|
||||
|
||||
```
|
||||
# Folders only present in folder1 (generated/user data)
|
||||
build/
|
||||
en.userdb/
|
||||
luna_pinyin.userdb/
|
||||
wanxiang.userdb/
|
||||
replacer.userdb/
|
||||
sequence.userdb/
|
||||
stats.userdb/
|
||||
tips.userdb/
|
||||
|
||||
# User/local config files only present in folder1
|
||||
default.custom.yaml
|
||||
installation.yaml
|
||||
user.yaml
|
||||
wanxiang_english.custom.yaml
|
||||
wanxiang_mixedcode.custom.yaml
|
||||
wanxiang_reverse.custom.yaml
|
||||
wanxiang.custom.yaml
|
||||
weasel.custom.yaml
|
||||
my_dict.dict.yaml
|
||||
my_phrase.txt
|
||||
|
||||
```
|
||||
@@ -0,0 +1,148 @@
|
||||
```json
|
||||
{
|
||||
// --- 通用与外观 ---
|
||||
"window.zoomLevel": 0.3,
|
||||
"window.restoreWindows": "none",
|
||||
"extensions.ignoreRecommendations": true,
|
||||
"workbench.colorTheme": "One Dark Pro",
|
||||
"workbench.iconTheme": "vscode-icons",
|
||||
"workbench.startupEditor": "none",
|
||||
"workbench.editor.closeOnFileDelete": true,
|
||||
"security.workspace.trust.enabled": false,
|
||||
"editor.fontFamily": "JetBrainsMono Nerd Font Mono, JetBrains Mono, Consolas, 'Courier New', monospace",
|
||||
"editor.fontSize": 16,
|
||||
"editor.lineNumbers": "interval",
|
||||
"editor.cursorBlinking": "smooth",
|
||||
"editor.cursorSmoothCaretAnimation": "on",
|
||||
"editor.renderWhitespace": "boundary",
|
||||
"editor.bracketPairColorization.enabled": true,
|
||||
"editor.guides.bracketPairs": "active",
|
||||
"editor.stickyScroll.enabled": true,
|
||||
"editor.codeLens": true,
|
||||
"editor.detectIndentation": true,
|
||||
"editor.linkedEditing": true,
|
||||
"editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file",
|
||||
"files.insertFinalNewline": true,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
// --- 搜索 ---
|
||||
"search.exclude": {
|
||||
"**/*.java": false
|
||||
},
|
||||
// --- 版本控制 ---
|
||||
"git.autofetch": true,
|
||||
"git.enableSmartCommit": true,
|
||||
"git.confirmSync": false,
|
||||
// --- 终端 ---
|
||||
"terminal.integrated.windowsEnableConpty": true,
|
||||
"terminal.integrated.defaultProfile.windows": "PowerShell",
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
"terminal.integrated.cursorStyle": "line",
|
||||
"terminal.integrated.cursorStyleInactive": "line",
|
||||
"terminal.integrated.enablePersistentSessions": false,
|
||||
"terminal.integrated.persistentSessionReviveProcess": "never",
|
||||
"terminal.integrated.copyOnSelection": true,
|
||||
"terminal.integrated.stickyScroll.enabled": false,
|
||||
"terminal.integrated.lineHeight": 1.2,
|
||||
// --- Go ---
|
||||
"go.toolsGopath": "D:\\MyGo\\go-tools",
|
||||
"go.toolsManagement.autoUpdate": true,
|
||||
"[go]": {
|
||||
"editor.defaultFormatter": "golang.go"
|
||||
},
|
||||
// --- Python ---
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.autopep8"
|
||||
},
|
||||
// --- Java ---
|
||||
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable -Dfile.encoding=UTF-8",
|
||||
"java.jdt.ls.lombokSupport.enabled": true,
|
||||
"java.configuration.maven.userSettings": "E:\\Environment\\Mavens\\settings.xml",
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"java.configuration.runtimes": [
|
||||
{
|
||||
"name": "JavaSE-1.8",
|
||||
"path": "E:\\Environment\\Jdks\\jdk-8u431-windows-x64\\jdk1.8.0_431"
|
||||
},
|
||||
{
|
||||
"name": "JavaSE-11",
|
||||
"path": "E:\\Environment\\Jdks\\jdk-11.0.25_windows-x64_bin\\jdk-11.0.25"
|
||||
},
|
||||
{
|
||||
"name": "JavaSE-17",
|
||||
"path": "E:\\Environment\\Jdks\\jdk-17.0.13_windows-x64_bin\\jdk-17.0.13"
|
||||
},
|
||||
{
|
||||
"name": "JavaSE-21",
|
||||
"path": "E:\\Environment\\Jdks\\jdk-21_windows-x64_bin\\jdk-21.0.6",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "JavaSE-25",
|
||||
"path": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1"
|
||||
}
|
||||
],
|
||||
"java.maven.downloadSources": true,
|
||||
"java.completion.matchCase": "off",
|
||||
"java.completion.importOrder": ["", "javax", "java", "#"],
|
||||
"java.compile.nullAnalysis.mode": "disabled",
|
||||
"java.sources.organizeImports.starThreshold": 999,
|
||||
"java.sources.organizeImports.staticStarThreshold": 999,
|
||||
"java.referencesCodeLens.enabled": true,
|
||||
"java.implementationCodeLens": "all",
|
||||
"java.signatureHelp.enabled": true,
|
||||
"java.debug.settings.onBuildFailureProceed": false,
|
||||
"java.debug.settings.showLogicalStructure": true,
|
||||
"[java]": {
|
||||
"editor.defaultFormatter": "josevseb.google-java-format-for-vs-code",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.removeUnusedImports": "always"
|
||||
}
|
||||
},
|
||||
// --- Spring Boot ---
|
||||
"boot-java.embedded-syntax-highlighting": true,
|
||||
"boot-java.highlight-codelens.on": true,
|
||||
"boot-java.jpql": true,
|
||||
// --- Maven ---
|
||||
"maven.executable.path": "E:\\Environment\\Mavens\\apache-maven-3.9.9-bin\\apache-maven-3.9.9\\bin\\mvn.cmd",
|
||||
"maven.executable.options": "-DskipTests",
|
||||
"maven.settingsFile": "E:\\Environment\\Mavens\\settings.xml",
|
||||
"maven.showInExplorerContextMenu": true,
|
||||
"maven.view": "hierarchical",
|
||||
"maven.terminal.useJavaHome": true,
|
||||
// 解决 Maven SSL 问题,自 3.9.0 起默认 不再使用 Wagon 做 HTTPS
|
||||
// -Dmaven.resolver.transport=wagon
|
||||
"maven.terminal.customEnv": [
|
||||
{
|
||||
"environmentVariable": "JAVA_TOOL_OPTIONS",
|
||||
"value": "-Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
|
||||
},
|
||||
{
|
||||
"environmentVariable": "MAVEN_OPTS",
|
||||
"value": "-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
|
||||
}
|
||||
],
|
||||
// --- Toml ---
|
||||
"[toml]": {
|
||||
"editor.defaultFormatter": "tamasfe.even-better-toml"
|
||||
},
|
||||
// --- Xml ---
|
||||
"[xml]": {
|
||||
"editor.defaultFormatter": "redhat.vscode-xml"
|
||||
},
|
||||
// --- PowerShell ---
|
||||
"[powershell]": {
|
||||
"editor.defaultFormatter": "ms-vscode.powershell"
|
||||
},
|
||||
// --- 质测 ---
|
||||
"sonarlint.focusOnNewCode": false,
|
||||
"sonarlint.automaticAnalysis": true,
|
||||
"sonarlint.ls.javaHome": "E:\\Environment\\Jdks\\jdk-25_windows-x64_bin\\jdk-25.0.1",
|
||||
"sonarlint.pathToNodeExecutable": "E:\\Environment\\Nvm\\nodejs\\node.exe",
|
||||
// --- 联动 ---
|
||||
"liveServer.settings.CustomBrowser": "chrome"
|
||||
}
|
||||
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
```
|
||||
-Xms1024m
|
||||
-Xmx4096m
|
||||
-XX:ReservedCodeCacheSize=512m
|
||||
-XX:+IgnoreUnrecognizedVMOptions
|
||||
-XX:+UseG1GC
|
||||
-XX:SoftRefLRUPolicyMSPerMB=50
|
||||
-XX:CICompilerCount=2
|
||||
-XX:+HeapDumpOnOutOfMemoryError
|
||||
-XX:-OmitStackTraceInFastThrow
|
||||
-ea
|
||||
-Dsun.io.useCanonCaches=false
|
||||
-Djdk.http.auth.tunneling.disabledSchemes=""
|
||||
-Djdk.attach.allowAttachSelf=true
|
||||
-Djdk.module.illegalAccess.silent=true
|
||||
-Dkotlinx.coroutines.debug=off
|
||||
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
|
||||
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
|
||||
|
||||
--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
|
||||
--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED
|
||||
|
||||
-javaagent:E:\DevTool\Jetbrains\jetbra\ja-netfilter.jar=jetbrains
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user