项目中要使用的指令

PyCharm

 1. 如何切换分支?

git branch 查看当前在哪个分支,也会显示本地所有的分支名

git branch dev-chenqiao 新建分支

git checkout dev-chenqiao 切换到dev-chenqiao分支

git pull origin dev-chenqiao 拉取dev-chenqiao分支代码

git checkout . 取消本地修改

git clean -f 有时候即使执行了git checkout .取消修改后pull还是会失败,可以执行一下这个

git diff URL 查看所有修改项

git diff xxx.py 查看xxx.py文件的修改

 

 

2.打印数据用日志 有三种常用的方法?

logging.error()

logging.info()

logging.debug()

 

列子:

logging.error()

logging.info("Wechat server start on port: %d" % options.port)

定义logging

def log_init():

    logging.basicConfig(

        level=logging.DEBUG,

       format=’%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s’,//显示当前哪一行会报错

        datefmt=’%a, %d %b %Y %H:%M:%S’,//时间格式

        filename=’wechat.log’,//文件名称

        filemode=’a’

)

 

乌龟

1.重命名kexin_wxapp文件夹为kexin_wxapp_old

2.coding.net上新建分支dev-chenqiao(该分支来源于当前版本dev分支)

3.用小乌龟重新拉取coding.net上的代码(git clone项),该代码文件夹会叫做kexin_wxapp

4.打开DOS终端进入kexin_wxapp文件夹,新建分支:git branch dev-chenqiao

5.切换到dev-chenqiao分支:git checkout dev-chenqiao

6.拉取dev-chenqiao分支最新代码:git pull origin dev-chenqiao

7.Beyond compare工具对比kexin_wxapp和kexin_wxapp_old两个文件夹

8.修改完后用小乌龟commit

9.用小乌龟push到coding.net上的dev-chenqiao

10.coding.net上创建合并请求,合并dev-chenqiao到dev

 

 

curl

curl URL -x "POST" -d ''

 

Nginx

Nginx start  运行

Nginx stop 停止

Nginx -s restart

Nginx -s top

Nginx -s stops

 

Nginx反代理配置

 

Nginx的配置还是比较简单的,如:

location ~ /*

{

proxy_pass http://127.0.0.1:8008;

}

或者

location /

{

proxy_pass http://127.0.0.1:8008;

}

server {

        listen       443;

        server_name  localhost;

        ssl                  on;

        ssl_certificate      server.crt;

        ssl_certificate_key  server.key;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv2 SSLv3 TLSv1;

        ssl_ciphers  HIGH:!aNULL:!MD5;

        ssl_prefer_server_ciphers   on;

    }

server.crt  server.key 是证书和私钥路径 

 

Xshell指令 上传图片

1.进入图片目录(cd——change directory

cd /usr/local/nginx/conf/images/

2.pwd显示当前目录

3.rm 删除

4.ll 查看

 

 

 其他的指令使用了继续完善。。。。有不懂的WX TYR168

转载于:https://www.cnblogs.com/TangYR168/p/6362760.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值