05 2017 档案

git忽略已追踪文件
摘要:在更新项目代码时,需要修改配置文件,为了避免在更新代码时重新pull配置文件,使用.gitignore可以解决此问题。 首先,在配置文件所在目录创建文件.gitignore(git bash里使用命令touch .gitignore) 然后,.gitignore配置需要忽略的文件 .gitignor 阅读全文

posted @ 2017-05-31 17:04 sunshine_zhf 阅读(224) 评论(0) 推荐(0)

Git忽略规则及.gitignore规则不生效的解决办法
摘要:在git中如果想忽略掉某个文件,不让这个文件提交到版本库中,可以使用修改根目录中 .gitignore 文件的方法(如无,则需自己手工建立此文件)。这个文件每一行保存了一个匹配的规则例如: 1 2 3 4 5 6 7 # 此为注释 – 将被 Git 忽略 *.a # 忽略所有 .a 结尾的文件 !l 阅读全文

posted @ 2017-05-27 14:38 sunshine_zhf 阅读(134) 评论(0) 推荐(0)

git常用命令
摘要:git clone 远程分支地址 git branch 列出当前repository下的所有branch git checkout 分支名 git pull 获取新代码 git status -s 查看本地修改了什么 git checkout -- . 未提交文件恢复到保存点 git log 显示到 阅读全文

posted @ 2017-05-27 14:17 sunshine_zhf 阅读(169) 评论(0) 推荐(0)

自动化测试用例设计
摘要: 阅读全文

posted @ 2017-05-24 15:28 sunshine_zhf 阅读(120) 评论(0) 推荐(0)

使用Python的Requests库进行web接口测试
摘要:1、Requests简介 Requests 是使用 Apache2 Licensed 许可证的 HTTP 库。用 Python 编写,真正的为人类着想。 Python 标准库中的 urllib2 模块提供了你所需要的大多数 HTTP 功能,但是它的 API 太渣了。它是为另一个时代、另一个互联网所创 阅读全文

posted @ 2017-05-24 11:48 sunshine_zhf 阅读(2126) 评论(0) 推荐(0)

Centos中查看nginx、apache、php、mysql配置文件路径
摘要:1、判断apache首先执行命令找到httpd路径ps aux | grep httpd如httpd路径为 /usr/local/apache/bin/httpd然后执行以下命令/usr/local/apache/bin/httpd -V | grep “SERVER_CONFIG_FILE”即可找 阅读全文

posted @ 2017-05-15 13:11 sunshine_zhf 阅读(876) 评论(0) 推荐(0)

nginx下vhost配置
摘要:配置文件所在目录: /usr/local/nginx/conf/vhost/XXX.conf server { listen 9191; server_name localhost; (或IP) charset utf-8; error_log /home/wwwlogs/cloud_dailybu 阅读全文

posted @ 2017-05-15 13:07 sunshine_zhf 阅读(2977) 评论(0) 推荐(0)

python实现查询sql后导出到excel并发送邮件
摘要:#coding=utf-8import sysimport xlwtimport pymysql as MySQLdb #这里是python3 如果你是python2.x的话,import MySQLdbimport datetimeimport timeimport smtplibfrom ema 阅读全文

posted @ 2017-05-12 14:01 sunshine_zhf 阅读(763) 评论(0) 推荐(0)

linux shell 重定向
摘要:0表示标准输入 1表示标准输出 2表示标准错误输出 >默认为标准输出重定向,于 1> 相同 2>&1 意思是把标准错误输出重定向到标准输出 &>file 意思是把标准输出 和标准错误输出 都重定向到文件file中 阅读全文

posted @ 2017-05-12 13:00 sunshine_zhf 阅读(136) 评论(0) 推荐(0)

linux常用命令
摘要:1、vi设置行号 > :se nu 2、vimdiff文档比较命令 垂直打开: vimdiff point.c point-a.c 水平打开: vimdiff -o point.c point-a.c 阅读全文

posted @ 2017-05-12 12:54 sunshine_zhf 阅读(111) 评论(0) 推荐(0)

crontab执行python脚本设置和遇到的一些坑
摘要:crontab -e 0 4 * * * /root/scripts/mysqlbackup.sh 0 4 * * * /root/scripts/apacherestart.sh 0 5 * * 1,3,5 /usr/bin/python /home/report/report_form.py & 阅读全文

posted @ 2017-05-11 16:19 sunshine_zhf 阅读(645) 评论(0) 推荐(0)

python操作数据库
摘要:import pymysql conn = pymysql.connect(host='192.168.10.124',port=3306,user='root',passwd='root',db='cloud',charset='utf8mb4') cursor = conn.cursor()sq 阅读全文

posted @ 2017-05-10 14:46 sunshine_zhf 阅读(108) 评论(0) 推荐(0)

python实现发送带附件的邮件
摘要:#coding=utf-8 import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MI 阅读全文

posted @ 2017-05-10 14:43 sunshine_zhf 阅读(307) 评论(0) 推荐(0)

python实现查询的数据写入到excel
摘要:#coding=utf-8import sysimport xlwtimport pymysql as MySQLdb #这里是python3 如果你是python2.x的话,import MySQLdbimport datetime host = '192.168.10.109'user = 'r 阅读全文

posted @ 2017-05-10 14:41 sunshine_zhf 阅读(1580) 评论(0) 推荐(0)

mysql学习笔记
摘要:一、mysql –h192.168.4.28 -uroot –ppassword h:当连接MySQL服务器不在同台主机时,填写主机名或IP地址 u:登录MySQL的用户名 p:登录MySQL的密码 注意:密码如果写在命令行的时候一定不能有空格。如果使用的系统为linux并且登陆用户名字与MySQL 阅读全文

posted @ 2017-05-04 13:57 sunshine_zhf 阅读(181) 评论(0) 推荐(0)

导航