Skip to content

Instantly share code, notes, and snippets.

@hyoban
Last active June 19, 2025 04:04
Show Gist options
  • Save hyoban/7943d4c59c43b79d3f8388671437fe11 to your computer and use it in GitHub Desktop.
Save hyoban/7943d4c59c43b79d3f8388671437fe11 to your computer and use it in GitHub Desktop.
Hyoban's dotfiles
[user]
name = Stephen Zhou
email = [email protected]
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDg/3T8nsnp4yqbQ0PFTs2rFZZZ7z6WFzIkp+r5EXdQB
[init]
defaultBranch = main
[gpg]
format = ssh
[commit]
gpgsign = true
[gpg "ssh"]
program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign
# https://ohmyz.sh
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
export ZSH="$HOME/.oh-my-zsh"
# https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/README.md
# git clone https://github.com/hyoban/spaceship-node-package-manager.git $ZSH_CUSTOM/plugins/spaceship-node-package-manager
# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
plugins=(
git
spaceship-node-package-manager
zsh-autosuggestions
zsh-syntax-highlighting
)
# https://github.com/spaceship-prompt/spaceship-prompt
# git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
# ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
ZSH_THEME="spaceship"
source $ZSH/oh-my-zsh.sh
spaceship add node_package_manager --before exec_time
eval "$(mise activate zsh)"

在重置系统之前

  • 反激活 surge

相信的同步服务

  • Google Chrome(拓展)(可以完全不使用)
  • 1Password(密码、软件购买记录、Git SSH Key)
  • VSCode(设置、插件)(备份于 Gist,可以完全不使用)
  • Folo(全部订阅信息)

奇怪的使用习惯

  • 不收藏,不光是浏览器收藏,各个平台也是一样
  • 不留历史记录,不依赖浏览器地址栏补全
  • 聚合关注的信息到 RSS 全部使用 Folo,(Twitter 还没有)

软件列表

基本上来说软件安装完了,就无法恢复安装之前的状态,清理卸载残留是没有意义的,不如隔一段时间重置系统。不要花时间来清理,只要保持只安装不可以避免的软件即可。

Surge

暂时未找到体验上和 Surge 一样好用的软件,不要折腾这个!

Homebrew

  • 注意安装完写入环境变量

Chrome

  • 登录同步
  • 1Password,AdGuard AdBlocker,File Icons for GitHub and GitLab,Grammarly,Immersive Translate,MetaMask,Refined GitHub,RSSHub Radar,Tampermonkey,划词翻译
  • 不用 Brave、Arc,不好用

Raycast

CleanShot X

  • 自动保存截图到剪贴板

1Password

  • 注意下载的是安装器
  • 设置拓展和 mac 互通
  • 拓展关闭填充后自动提交
  • 关闭开机自启

vscode

  • 注意下载 arm only 版本
  • 设置同步
  • 添加 code 命令

开发

  • 设置 gitconfig 和 1password agent
  • git ssh over https
  • 设置终端
  • 安装 node corepack
  • 拉代码,测试 git
  • 安装字体
  • gh cli、npm 登录
  • eas 登录

XCode

非必要不安装(可使用 ci 来构建 expo dev client)

  • brew install CocoaPods fastlane
  • xcode 安装完可能需要设置里选一下路径

https://docs.expo.dev/get-started/set-up-your-environment

OrbStack

非必要不安装(在家可以连 nas 的 docker 服务)

Mac Mouse Fix

  • 关闭按键绑定

Supercharge

Tweaks

  • Prevent accidental quits by quitting apps with
  • Prevent Dock from showing when moving mouse to screen edge
  • Context menu items: Airdrop, New Text File, Open in terminal, Open in App (VS Code)
  • Show hidden files
  • Automatically clear clipboard for improved privacy
  • Quit an app when closing its last window
  • Offer to install apps from mounted DMG files

Shortcuts

  • Dark mode
  • Start cleaning mode (beta)

iStat Menus

大多数情况下不要安装这个,目前只是为了监控 Mac mini 跑 GitHub Runner 的情况(CPU,外接硬盘容量、温度)。

[tools]
bun = "latest"
node = "lts"
"npm:@antfu/ni" = "latest"
"npm:eas-cli" = "latest"
[settings]
idiomatic_version_file_enable_tools = []
{
"workbench.editor.limit.enabled": true,
"workbench.editor.limit.perEditorGroup": true,
"workbench.editor.limit.value": 5,
"workbench.sideBar.location": "right",
"breadcrumbs.enabled": false,
"editor.accessibilitySupport": "off",
"editor.bracketPairColorization.enabled": false,
"editor.minimap.enabled": false,
"editor.renderLineHighlight": "none",
"security.workspace.trust.enabled": false,
"window.commandCenter": false,
"window.restoreWindows": "none",
"workbench.layoutControl.enabled": false,
"workbench.startupEditor": "none",
"workbench.tips.enabled": false,
"editor.fontFamily": "Monolisa Variable",
"editor.fontSize": 15,
"terminal.integrated.fontSize": 15,
"editor.fontVariations": true,
"editor.lineHeight": 25,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment",
"settings": {
"fontStyle": "italic"
}
}
]
},
// git related
"diffEditor.ignoreTrimWhitespace": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"gitlens.codeLens.enabled": false,
"gitlens.currentLine.enabled": false,
"gitlens.hovers.currentLine.over": "line",
"gitlens.hovers.enabled": false,
"gitlens.launchpad.indicator.enabled": false,
"gitlens.views.scm.grouped.views": {
"commits": false,
"branches": false,
"remotes": true,
"stashes": false,
"tags": true,
"worktrees": true,
"contributors": true,
"repositories": false,
"searchAndCompare": false,
"launchpad": false
},
// animations
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "on",
"editor.smoothScrolling": true,
"workbench.list.smoothScrolling": true,
"window.title": "${rootName}${separator}${activeEditorLong}",
// "editor.renderWhitespace": "boundary",
"workbench.colorTheme": "Default Light Modern",
"files.simpleDialog.enable": true,
"zenMode.fullScreen": false,
// others
"files.readonlyFromPermissions": true,
"files.readonlyInclude": {
"**/node_modules/**": true,
"**/package-lock.json": true,
"**/pnpm-lock.yaml": true,
"**/yarn.lock": true
},
"search.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"**/Thumbs.db": true,
"**/package-lock.json": true,
"**/pnpm-lock.yaml": true,
"**/yarn.lock": true
},
"github.copilot.editor.enableCodeActions": false,
"github.copilot.enable": {
"*": true,
"plaintext": false,
"markdown": true,
"scminput": false
},
"debug.onTaskErrors": "debugAnyway",
"files.exclude": {
"**/.DS_Store": false,
"**/.git": false,
"**/.hg": false,
"**/.svn": false,
"**/CVS": false,
"**/Thumbs.db": false
},
"githubPullRequests.pullBranch": "never",
// "tailwindcss-classname-highlight.enableHoverProvider": true,
"diffEditor.renderSideBySide": false,
"workbench.editor.empty.hint": "hidden",
"window.autoDetectColorScheme": true,
"workbench.preferredDarkColorTheme": "GitHub Dark Default",
"workbench.preferredLightColorTheme": "GitHub Light Default",
"diffEditor.experimental.showMoves": true,
"typescript.updateImportsOnPaste.enabled": false,
"javascript.updateImportsOnPaste.enabled": false,
"editor.renderWhitespace": "boundary",
"cSpell.diagnosticLevel": "Hint",
"iconify.inplace": false,
// "tailwindCSS.annotations": true,
"tailwindCSS.colorDecorators": false,
"unocss.colorPreview": false,
"errorLens.enabledDiagnosticLevels": ["error", "warning", "info", "hint"],
"errorLens.excludeByMessage": [
{
"regex": "^\".*\": Unknown word\\.$"
}
// "Classname '.*' is not a Tailwind CSS class!"
// ".* is defined but never used",
// ".* is declared but never used",
// ".* is assigned a value but never used",
// ".* is declared but its value is never read"
],
"errorLens.fontStyleItalic": true,
"markdownlint.config": {
"no-bare-urls": false,
"no-inline-html": false,
"fenced-code-language": false,
"no-duplicate-heading": false,
"no-alt-text": false,
"first-line-h1": false
},
"files.associations": {
".env.*": "dotenv"
},
"githubPullRequests.ignoredPullRequestBranches": [
"dev",
"main"
],
"workbench.editorAssociations": {
"*.copilotmd": "vscode.markdown.preview.editor",
"*.svg": "default"
},
"workbench.iconTheme": "file-icons",
"workbench.activityBar.location": "top",
"github.copilot.nextEditSuggestions.enabled": true,
"diffEditor.hideUnchangedRegions.enabled": true,
"editor.lineNumbers": "off",
"diffEditor.maxComputationTime": 0
}

Finder

  • General
    • Show these items on the desktop (Turn off all)
    • New Finder windows show (Home folder)
  • Sidebar
    • Hide tags; Show home folder and all Locations and iCloud
  • Advanced
    • Show all filename extensions (On)
  • View -> Show Path Bar (On)
  • Top folder -> Right click -> Show View Options -> Sort by Name, Use as Defaults

Desktop & Dock

  • Remove all apps from Dock
  • Dock
    • Automatically hide and show the Dock (On)
    • Show suggested and recent apps in Dock (Off)
  • Desktop & Stage Manager
    • Click wallpaper to reveal desktop (Only in Stage Manager)
  • Windows
    • Tiled windows have margins (Off)
  • Hot Corners (Only for Desktop)
    • Bottom left: Launchpad
    • Bottom right: Mission Control

Control Center

  • Don't Show in menu bar (Spotlight)
  • Always Show in Menu Bar (Sound)
  • Clock Options
    • Display the time with seconds (On)

Keyboard

  • Keyboard navigation (On)
  • Key repeat rate (Fast) and Delay until repeat (Short)
  • Text Input
    • Add period with double-space (Off)
  • Keyboard Shortcuts
    • Screenshots (Turn off all, use CleanShot X)
    • Spotlight (Turn off, use Raycast)
    • Modifier keys (Caps Lock -> Control)

Trackpad

  • Tap to click (On)

Accessibility

  • Pointer Control -> Trackpad Options
    • Use trackpad for dragging (On)
    • Dragging style (Three finger drag)

Energy

  • Prevent automatic sleeping when the display is off (Desktop && GitHub Action runner Only)

Apple Account

Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
Host github.com
Hostname ssh.github.com
Port 443
User git
# https://stackoverflow.com/a/49398449/15548365
# code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension amodio.tsl-problem-matcher
code --install-extension antfu.array-index-inlay
code --install-extension antfu.unocss
code --install-extension biomejs.biome
code --install-extension bradlc.vscode-tailwindcss
code --install-extension davidanson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension editorconfig.editorconfig
code --install-extension esbenp.prettier-vscode
code --install-extension github.copilot
code --install-extension github.copilot-chat
code --install-extension github.github-vscode-theme
code --install-extension github.vscode-github-actions
code --install-extension github.vscode-pull-request-github
code --install-extension hyoban.file-icons-continue
code --install-extension hyoban.tailwindcss-classname-highlight
code --install-extension johnsoncodehk.vscode-tsconfig-helper
code --install-extension johnsoncodehk.vscode-tsslint
code --install-extension mikestead.dotenv
code --install-extension mxsdev.typescript-explorer
code --install-extension naumovs.color-highlight
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension usernamehw.errorlens
code --install-extension vue.volar
code --install-extension yutengjing.package-manager-enhancer
@hyoban
Copy link
Author

hyoban commented Jul 11, 2024

brew update && brew upgrade && brew autoremove && brew cleanup --prune=all

defaults write com.apple.dock ResetLaunchPad -bool true && killall Dock

@hyoban
Copy link
Author

hyoban commented Mar 2, 2025

sudo find 2>/dev/null /private/var/folders/ -type d -name com.apple.dock.launchpad -exec rm -rf {} +; killall Dock

https://www.reddit.com/r/mac/comments/1hfzakq/unable_to_reset_launchpad_using_terminal/?rdt=33626

@hyoban
Copy link
Author

hyoban commented Jun 8, 2025

https://www.cudy.com/zh-cn/pages/download-center/tr3000-1-0
https://www.right.com.cn/forum/thread-8428621-1-1.html
https://openwrt.ai/?target=mediatek%2Ffilogic&id=cudy_tr3000-v2-mod

curl -s -L https://fastly.jsdelivr.net/gh/nikkinikki-org/OpenWrt-nikki/feed.sh | ash
opkg install nikki
opkg install luci-app-nikki
opkg install luci-i18n-nikki-zh-cn

https://github.com/nikkinikki-org/OpenWrt-nikki
https://github.com/MetaCubeX/meta-rules-dat

GeoLite2-ASN.mmdb
country.mmdb
geoip.db
geosite.db

关闭网络 -> DHCP/DNS -> DNS 重定向这一选项

https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment