View cloud-ide-setup.sh
This file contains 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
# https://code.visualstudio.com/docs/editor/command-line#_working-with-extensions | |
# code --list-extensions | |
code --uninstall-extension cduruk.thrift | |
code --uninstall-extension byted-sec.bytesec-vscode | |
code --uninstall-extension byted-ide.ppe-debug | |
code --uninstall-extension byted-ide.ftt | |
code --uninstall-extension byted-ide.cloud-dev-task | |
code --uninstall-extension byted-ide.cloud-dev-debug | |
code --install-extension shalldie.background |
View .lunar-vim-install.sh
This file contains 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
# https://www.lunarvim.org/ | |
# https://www.lunarvim.org/docs/installation | |
brew install neovim rust | |
brew tap homebrew/cask-fonts | |
brew install --cask font-hack-nerd-font | |
npm i -g neovim | |
# install without asking confirm plugins (asking default in official) |
View .sources.mts
This file contains 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 path from 'path' | |
import { spawn } from 'child_process' | |
import { promises as fs } from 'fs' | |
import readline from 'readline' | |
import { chunk } from 'lodash-es' | |
/** | |
* usage: | |
* tsx <path>/.sources.mts <target dir> | |
*/ |
View .deps.mts
This file contains 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 path from 'path' | |
import { argv, fs } from 'zx' | |
import type { IModule } from 'dependency-cruiser' | |
import { | |
keyBy, | |
} from 'lodash-es' | |
/** | |
* depcruise -p -c dependency-cruiser.config.js --output-type json src > .logs/depcruise/src.json | |
*/ |
View comb-import.mts
This file contains 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
/** | |
* download command: | |
* curl -O https://gist.githubusercontent.com/zthxxx/6306cab0615df6c0545bbc4fb07179dc/raw/comb-import.mts | |
*/ | |
import path from 'path' | |
import os from 'os' | |
import { $, argv, fs } from 'zx' | |
View codeshift-duplicate-import.ts
This file contains 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 { | |
namedTypes as types, | |
} from 'ast-types' | |
import type { | |
Options as RecastOptions, | |
} from 'recast' | |
import type { | |
Transform, | |
FileInfo, | |
API, |
View expression.pegjs
This file contains 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
{ | |
/** | |
* pegjs grammar: | |
* https://github.com/pegjs/pegjs/blob/7d13580855/docs/grammar/README.md | |
* https://github.com/pegjs/pegjs/blob/7d13580855/docs/grammar/action-execution-environment.md | |
* | |
* playground: https://pegjs.org/online | |
* | |
* > pegjs expression.pegjs -o parser.js --format es | |
*/ |
View gist:2599867d9da448f76cb401c3e2ba094f
This file contains 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
sudo mdutil -a -i off | |
sudo mdutil -V /System/Volumes/Data/Applications -i on |
View git-data-for-package-lock.sh
This file contains 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
git fetch --all | |
# 7 天内有多少 commit 改动了 package-lock | |
git log --format=format:'%h' --no-merges --since="7 days ago" --all -- package-lock.json | wc -l | |
# 7 天内所有 commit 共产生了多少完全无重复的 package-lock | |
git log --format=format:'%h' --no-merges --since="7 days ago" --all -- package-lock.json | \ | |
xargs -I{} git ls-tree {} package-lock.json | \ | |
sort | uniq | wc -l |
View git-search-when-delete-files.sh
This file contains 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
git log --name-status --diff-filter=D <file / dir> |
NewerOlder