执行 Git 操作(提交、分支、合并、变基、冲突解决与恢复)时强制套用安全规则。
编程
Developer Essentials
试用Comprehensive developer cheatsheets and quick references for Git, Docker, Kubernetes, jq, curl, and common Linux commands. Use when needing quick lookups for...
它能做什么
Quick references for everyday developer tools. Copy-paste ready commands.
技能文档
Developer Essentials Cheatsheets
Quick references for everyday developer tools. Copy-paste ready commands.
📚 Git Cheatsheet
Basic Commands
# Initialize repo
git init
# Clone repo
git clone
git clone --depth 1 # Shallow clone (faster)
# Status & info
git status
git log --oneline -n 10
git diff
git diff --staged
Staging & Commits
git add . # Stage all
git add -p # Stage interactively
git commit -m "message"
git commit --amend # Edit last commit
git commit --amend --no-edit # Keep message
Branches
git branch # List branches
git branch -a # List all (including remote)
git checkout -b # Create & switch
git switch # Switch branch
git merge
git rebase
Push & Pull
git push origin
git push -u origin # Set upstream
git pull
git pull --rebase
git fetch origin
Undo & Fix
git restore # Discard changes
git restore --staged # Unstage
git reset HEAD~1 # Undo last commit (keep changes)
git reset --hard HEAD~1 # Destroy last commit
git stash
git stash pop
🐳 Docker Cheatsheet
Images
docker images # List images
docker pull
docker build -t .
docker build -t -f Dockerfile.dev .
docker rmi
docker image prune
Containers
docker ps # Running containers
docker ps -a # All containers
docker run -d -p 8080:80 # Detach + port
docker run -it --rm bash # Interactive + remove
docker exec -it bash
docker logs -f # Follow logs
docker stop
docker rm
docker rm -f # Force remove
Docker Compose
docker compose up -d
docker compose down
docker compose logs -f
docker compose restart
docker compose build
Cleanup
docker system prune -a # Remove all unused
docker system df # Disk usage
☸️ Kubernetes (kubectl) Cheatsheet
Context & Config
kubectl config get-contexts
kubectl config use-context
kubectl cluster-info
Get Resources
kubectl get pods
kubectl get pods -A # All namespaces
kubectl get services
kubectl get deployments
kubectl get nodes
kubectl get ns # Namespaces
kubectl get all
Describe & Debug
kubectl describe pod
kubectl logs
kubectl logs -f # Follow
kubectl exec -it -- bash
kubectl top pods # Resource usage
kubectl top nodes
Apply & Delete
kubectl apply -f manifest.yaml
kubectl apply -k ./ # Kustomize
kubectl delete -f manifest.yaml
kubectl delete pod
Quick Actions
kubectl expose deployment --port=80 --type=LoadBalancer
kubectl scale deployment --replicas=3
kubectl rollout restart deployment/
🔍 jq Cheatsheet (JSON Processor)
Basic Queries
# Identity (pretty print)
jq '.' file.json
# Get field
jq '.name' file.json
jq '.user.name' file.json
# Array index
jq '.[0]' file.json
jq '.[0].name' file.json
Array Operations
# Array length
jq '. | length' file.json
# All items in array
jq '.[]' file.json
# Map - extract field from array
jq '.[].name' file.json
jq '.[] | {name, email}' file.json
# Filter array
jq '.[] | select(.age > 30)' file.json
jq '.[] | select(.status == "active")' file.json
Transformations
# Create new object
jq '{user: .name, email: .contact.email}' file.json
# Add/remove fields
jq '. + {timestamp: now}' file.json
jq 'del(.password)' file.json
Useful Flags
jq -r '.name' file.json # Raw output (no quotes)
jq -c '.' file.json # Compact (one line)
jq -s '.' file1.json file2.json # Slurp multiple files
🌐 curl Cheatsheet
Basic Requests
curl https://api.example.com
curl -I https://example.com # Headers only
curl -v https://example.com # Verbose
HTTP Methods
curl -X POST https://api.example.com/data
curl -X PUT https://api.example.com/data/1
curl -X DELETE https://api.example.com/data/1
Headers & Body
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer token" \
https://api.example.com
curl -X POST -d '{"name":"test"}' \
-H "Content-Type: application/json" \
https://api.example.com
curl -X POST --data @file.json https://api.example.com
Output & Download
curl -o output.json https://api.example.com
curl -O https://example.com/file.zip # Save with original name
curl -L https://example.com # Follow redirects
🐧 Linux Essential Commands
File Operations
ls -la # List all (including hidden)
cp -r source dest # Copy recursive
mv old new # Move/rename
rm -rf dir # Remove recursive force
mkdir -p path/to/dir # Create parents too
touch file
chmod 755 file
chown user:group file
Search & Find
grep "pattern" file.txt
grep -r "pattern" . # Recursive
grep -i "pattern" file.txt # Case insensitive
find . -name "*.txt"
find . -type f -size +100M # Files > 100MB
Process Management
ps aux # All processes
top # Interactive process viewer
htop # Better top (if installed)
kill -9 # Force kill
pkill -f process_name
System Info
df -h # Disk usage
free -h # Memory
uname -a # System info
whoami
pwd # Current directory
Text Processing
cat file.txt
head -20 file.txt
tail -f log.txt # Follow file
less file.txt
wc -l file.txt # Line count
sort file.txt
uniq file.txt
Network
ifconfig / ip addr
netstat -tulpn # Listening ports
ss -tulpn # Modern netstat
ping example.com
curl ifconfig.me # Get public IP
ssh user@host
scp file.txt user@host:/path
💡 Pro Tips
- Use
manfor full documentation - Use
--helpflag on most commands - Pipe commands together:
ps aux | grep nginx - History search: Press
Ctrl+Rin terminal - Aliases save time - add to
~/.bashrcor~/.zshrc
相关技能
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
通过托管的 OAuth GraphQL 接口查询与管理 Linear 的 issue、项目、团队、周期、标签和评论。
在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
按用户明确指令,在得到大脑(Get笔记)中保存、搜索并管理笔记与知识库。
通过 6551 REST API 查询 Twitter/X 用户资料、推文、粉丝事件与 KOL 数据。
terrycarter1985 的更多技能
浏览全部技能为中国小学三到六年级英语书面作业打分,并给出符合年龄的鼓励式反馈。
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market c...
Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.
Generate reusable, policy-aligned customer service replies for e-commerce aftersales scenarios. Use when support staff need fast, compliant Chinese responses...
Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.
Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.