Node
node --prof app.js
node --prof-process isolate-0xnnnnnnnnnnnn-v8.log > processed.txt
SET NODE_ENV=production
export NODE_ENV=production
NODE_ENV=production node app.js
cross-env NODE_ENV=production node .\bin\www
Docker
docker build -t 06724066512.dkr.ecr.us-west-2.amazonaws.com/sp-inbound-connector:1.0.0.3 ./sp-inbound-connector
docker push 06724066512.dkr.ecr.us-west-2.amazonaws.com/sp-inbound-connector:1.0.0.3
docker exec -it 0cf0a6f75d4a mysql -uroot -p (123456)
Rabbitmq
rabbitmqctl
list_bindings Lists all bindings on a vhost
list_channels Lists all channels in the node
list_ciphers Lists cipher suites supported by encoding commands
list_connections Lists AMQP 0.9.1 connections for the node
list_consumers Lists all consumers in a vhost
list_exchanges Lists exchanges
list_hashes Lists hash functions supported by encoding commands
list_queues Lists queues and their properties
list_unresponsive_queues Tests queues to respond within timeout. Lists those which did not respond
Azure
az account list --output table
az account set --subscription “My Demos”
az group list
Kubernetes
kubectl config get-contexts
kubectl config use-context CONTEXT_NAME
kubectl get endpoints -n sp-dev
kubectl logs -f sp-inbound-connector-685f58d77d-9j26w -n sp-dev
kubectl rollout pause deployment/nginx-deployment
kubectl rollout resume deploy nginx
kubectl rollout history deployment/nginx-deployment --revision=2
kubectl rollout undo deployment/nginx-deployment --to-revision=2
kubectl edit deployment/nginx-deployment
kubectl rollout status deployment/nginx-deployment
kubectl scale deployment nginx-deployment --replicas 10
kubectl autoscale deployment nginx-deployment --min=10 --max=15 --cpu-percent=80
kubectl exec -it shell-demo – /bin/bash
kubectl exec -it CONTAINER_ID sh
kubectl exec -it redis-ha-server-2 -c sentinel -n sp-dev [-- ]/bin/sh
kubectl delete pods web-3476088249-w66jr
kubectl logs --previous ${POD_NAME} ${CONTAINER_NAME}
kubectl get event -n sp-stg --field-selector involvedObject.name=sp-outbound-connector-direct-workbench-7d9d65968b-xtlhc
kubectl exec -it redis-ha-server-2 -c sentinel -n sp-dev /bin/sh
Redis
redis-cli
redis-cli monitor
Git
git stash
git stash pop
git fetch upstream
git merge upstream/master
git log
git show 356f6def9d3fb7f3b9032ff5aa4b9110d4cca87e
git config --global user.name “John Doe”
git config --global user.email johndoe@example.com
github上已经有master分支 和dev分支
git checkout -b dev 新建并切换到本地dev分支
git pull origin dev 本地分支与远程分支相关联
在本地新建分支并推送到远程
git checkout -b test
git push origin test 这样远程仓库中也就创建了一个test分支
Linux
网络
查看进程占用端口
netstat -anp | grep 14231|wc -l
查看当前系统的网卡信息
ifconfig
查看当前系统的端口使用
netstat -an
查看dns: cat /etc/resolv.conf
防火墙:
ufw
本地
tar -zcvf test.tar.gz aaa.txt bbb.txt ccc.txt或:tar -zcvf test.tar.gz /test/
tar -xvf xxx.tar.gz -C /usr
z:调用gzip压缩命令进行压缩
c:打包文件
x:代表解压
v:显示运行过程
f:指定文件名