Skip to main content

Github

curl https://github.com/wenerme.keys >> ~/.ssh/authorized_keys
curl https://api.github.com/users/wenerme/keys

# .diff .patch
curl -LO https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2875.diff
git am 2875.diff

curl https://api.github.com
curl https://api.github.com/meta

gh

brew install gh

gh auth login
gh extension install github/gh-copilot

# ghcs - gh copilot suggest
# ghce - gh copilot explain
[ -n "$BASH_VERSION" ] && eval "$(gh copilot alias -- bash)"
[ -n "$ZSH_VERSION" ] && eval "$(gh copilot alias -- zsh)"
  • ~/.config/gh/config.yml
  • ~/.config/gh/host.yml
  • ~/.config/gh-copilot/config.yml
  • .github/copilot-instructions.md

Git LFS

version https://git-lfs.github.com/spec/v1
oid sha256:4cac19622fc3ada9c0fdeadb33f88f367b541f38b89102a3f1261ac81fd5bcb5
size 84977953

快速添加 License

获取最新版本

github-latest-version() {
set -o pipefail
curl -sfL https://api.github.com/repos/$1/releases/latest | jq .tag_name -r
local r=$?
set +o pipefail
return $r
}
# 但这种有多个 tag 的无解
github-latest-version kubernetes-sigs/nfs-subdir-external-provisioner

Socialify

language:"Protocol Buffer"

Markdown