- 博客(88)
- 收藏
- 关注
原创 grep参数
grep--line-buffered flush output on every line-o, --only-matching show only the part of a line matching PATTERNtail -f smart.log | grep --line-buffered -o 'Com2Cn -[0-9.]*' |
2016-10-31 11:59:53
826
原创 C# winform webbrowser指定内核为IE11
1)假设你应用程序的名字为MyApplication.exe2)运行Regedit,打开注册表,找到HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION3)添加以下项MyApplicatio
2016-08-22 15:35:27
5844
原创 python访问coind rpc使用python-jsonrpc
https://github.com/bmjames/python-jsonrpcaccess = ServiceProxy("http://"+user+":"+password+"@127.0.0.1:"+str(port) )print access.listtransactions("", num)
2016-08-17 19:39:26
1033
原创 编译运行java程序
编译javajavac -Djava.ext.dirs=./lib Go.java运行javaLD_LIBRARY_PATH=. java -Djava.ext.dirs=./lib Go
2016-07-13 19:05:58
358
原创 ssh反向隧道
ssh -CfNg -R 12345:127.0.0.1:22 xxx@110.110.110.110autossh -M 5678 -CfNgR 12345:localhost:22 xxx@110.110.110.110
2016-05-04 13:52:49
466
原创 linux2T以上分区格式化
parted /dev/sdcmklabel gptmkpart primary 0.00TB 4.00TBprintmkfs.ext3 -b 4096 /dev/sdc1blkidfstabUUID=xxxxxxxxxxxxxx /mnt/xxxxxxxxxxxxxx ext3 defaults 0 0
2016-04-18 15:50:53
622
原创 git 使用
列出当前分支和所有分支git branch创建新的分支git checkout -b developmentSwitched to a new branch 'development'git pull origin development
2016-02-26 00:41:38
378
原创 ubuntu服务器硬件配置
1. 系统cat /etc/issue2. 内存free -h3. 硬盘df -h4. CPUcat /proc/cpuinfocpu个数cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2015-12-21 10:01:45
1743
原创 mongodb建索引
db.zk.ensureIndex({"u":1},{"unique":true})删除重复from pymongo import MongoClientclient = MongoClient()db = client.vipdocumentname = db.zkkeys = {}for k in documentname.find(): key = k['u'
2015-12-17 17:28:50
430
原创 ubuntu安装mongodb
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
2015-12-16 15:52:03
373
原创 javascript发送DELETE请求
var xmlhttp = new XMLHttpRequest();xmlhttp.open("DELETE", "https://xxx.com/aaa", true);xmlhttp.setRequestHeader("x-xsrf-token", "fregvfre=");xmlhttp.send();
2015-11-23 21:13:05
3114
原创 python获取系统时间戳
import datetimeimport timecurrent_time = int(time.mktime(datetime.datetime.now().timetuple())*1000)
2015-10-28 15:26:31
869
原创 css定义select样式
select { width : 104px; height : 28px; line-height : 18px; padding-right
2015-10-23 00:06:04
471
原创 设置mysql数据库使用utf8编码
vi /etc/mysql/my.cnf[client]default-character-set=utf8[mysqld_safe]default-character-set=utf8[mysqld]character_set_server=utf8[mysql]default-character-set=utf8show variables like
2015-10-15 17:45:21
511
转载 django中文用户名
http://my.oschina.net/kelvinxupt/blog/357472mysql数据库启用中文在mysql的配置文件/etc/my.cnf的[mysqld]下加入character_set_server=utf8Django启用中文用户名Django默认只能以字母、数字、下划线组成用户名,修改检验用户名的正则表达式可以绕过这一规则:
2015-10-12 12:25:55
861
原创 python smtp发送邮件
http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001386832745198026a685614e7462fb57dbf733cc9f3ad000def send_mail(receiver, subject, body): print "send mail: ",
2015-09-29 12:28:53
381
原创 python生成html
https://code.google.com/p/pyh/pyh moduledef html_table(data): table = pyh.table(border=1) for row in data: tr = pyh.tr() for i in row: tr << pyh.td(i)
2015-09-29 12:26:47
797
原创 网页打开速度测量
WebPagetestis an open source project that is primarily being developed and supported by Google as part of our efforts to make the web faster.
2015-09-25 15:41:35
463
原创 GlusterFS错误
df: `/mnt/gluster/xx': Transport endpoint is not connectedumount /mnt/gluster/xxmount /mnt/gluster/xx
2015-09-14 09:33:54
1071
原创 python中set比list更耗内存
set1000000 917292 899754 104808 [14:06:05] 85M, 284M2000000 1836102 1795411 210149 [14:06:51] 162M, 360M3000000 2766704 2706924 300209 [14:07:36] 222M, 421M4000000 3705532 3623674 381064 [14:08:2
2015-09-11 14:20:49
2794
原创 python内存使用情况
pip install psutil pid = os.getpid() process = psutil.Process(pid=pid) rss, vms = process.memory_info() print "[%s] %dM, %dM" % (datetime.datetime.now().strftime("%H:%M:%S"), rs
2015-09-11 10:14:20
596
原创 python关闭stdout输出缓冲
加-u参数python -u xxx.py或class Unbuffered(object): def __init__(self, stream): self.stream = stream def write(self, data): self.stream.write(data) self.stream.flush
2015-09-02 14:52:40
2547
原创 python写csv文件
writer = csv.writer(file('your.csv', 'wb'), quoting=csv.QUOTE_NONNUMERIC)writer.writerow(['a','b'])QUOTE_NONNUMERIC对所有非整数或浮点数的字段加引号。
2015-08-28 15:13:24
693
转载 http请求 Icy-MetaData头
http://www.smackfu.com/stuff/programming/shoutcast.htmlShoutcast Metadata ProtocolHow To Parse Titles from MP3 StreamsI wanted to add the ability to show titles from Shoutcast stream
2015-08-11 09:30:29
5402
原创 DNS服务测试IPv4 IPv6
nslookup - xxx.xxx.xxx.xxx> set class=IN> set type=A> baidu.com> set type=AAAA> baidu.com
2015-07-31 13:34:33
1436
原创 mysql表内复制行数据
mysql> insert into auth_user select id+1 , concat(username, '1') , first_name , last_name , email , password from auth_user where id=1;
2015-07-30 09:28:05
2362
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人