自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(482)
  • 收藏
  • 关注

原创 新博客 https://robertzhai.github.io/

自建了个新博客 https://robertzhai.github.io/, 最新博客更新请移步 : https://robertzhai.github.io/

2016-11-20 19:14:12 922

原创 expect 实现 自动打包和提交代码到github

问题:web项目用gulp压缩处理之后,提交到github 需要2次执行命令,想把这个流程合并解决:expect交互式命令提交build_push.sh#!/usr/bin/bashgulprsync -avr build/* .git add *git ci -am 'update this repo'echo "start push .."expect ~/.acc

2016-11-13 18:03:28 1115

原创 k2pdfopt 多平台处理pdf的利器

官方使用文档:http://www.willus.com/k2pdfopt/help/mac.shtml

2016-11-11 22:02:09 1956

原创 gulp 学习总结

gulp 可以压缩静态资源 css,js,images ,通过gulp 可以让这些自动化,gulp 的 pipe 就像管道一样来处理静态资源。gulp 的配置文件见后,完整的项目demo请访问:https://github.com/robertzhai/web_build/tree/master/gulp-practise//gulpfile.js// Inc

2016-11-11 10:23:09 1041

原创 jshint 检查js文件代码规范

1. 安装npm install -g jshint 2.使用1)单文件jshint   main.js2)文件夹jshint  folder/*输出类似下面的:        3.参考文档:http://jshint.com/docs/

2016-11-10 17:11:07 1745

原创 好书推荐-《写给大家看的设计书(第3版)》

挤时间看完了这本书,写的很好。作者从对比(Contrast)、重复(Repetition)、对齐(Alignment)、亲密性(Proximity)这4大基本原则方面介绍了怎样做出更好的设计。免费下载地址:写给大家看的设计书

2016-11-09 14:39:43 658

原创 MemcacheQ 安装和测试

1.安装参考>http://memcachedb.org/memcacheq/ >http://www.lmyw.net.cn/?p=729>berkeley: wget http://download.oracle.com/berkeley-db/db-5.1.25.tar.gz  2.启动memcacheq:memcacheq -d -uroot -

2016-11-08 17:15:17 400

原创 好书推荐-《软技能》

《软技能》这本书共71章,终于从头到尾看完了,受益很多,作者从技术、职场、品牌、为人处世、理财、学习能力等方面讲述了怎样成为一名成功的开发者,下载地址:免费下载 。

2016-11-06 15:05:18 656

原创 Mac git amend There was a problem with the editor 'vi'.

$git ci -a  --amend 提示error: There was a problem with the editor 'vi'.Please supply the message using either -m or -F option.solution:git config --global core.editor /usr/bin/vim

2016-11-03 11:36:19 1410

原创 phphub5 centos 安装

phphub5 是用laravel 开发的一个论坛,地址:https://github.com/summerblue/phphub5, 由于需要的环境版本比较高,就用虚拟机配置了下,没有用官方的homestead方法1.安装 phpcomposer 参考: http://docs.phpcomposer.com/00-intro.html#Globally2.编译或者用

2016-10-30 08:48:17 3208

原创 《C语言点滴》- 总结

补一下c语言基础知识,看了下,指针部分总结的很好,不过内容少了些。下载地址:github 下载

2016-10-30 08:18:44 414

原创 《Web全栈工程师的自我修养》-好书推荐

腾讯一线八年实战历练,从腼腆的菜鸟程序员到才情兼备的技术大拿,全栈工程师兼修的修炼手册。,作者博客:https://yuguo.us/weblog/full-stack-engineer/, 电子书下载:百度网盘下载 。

2016-10-30 08:08:41 3098

原创 Dr.Cleaner:清理磁盘和内存,深度卸载应用程序,监控CPU使用率和网络占用情况

很不错的清理mac的磁盘工具,app store 免费下载地址:app store 下载

2016-10-29 10:28:41 1246 1

原创 《负负得正的人生奥义书》 - 好书推荐

最近负面思想比较多,公司公布了Q3财报,股价就跌了,项目的gmv增长的不够快,以前的同事离职了 ......。看看这本书缓冲下,书的内容不错,看看无妨,下载地址:免费 下载。

2016-10-28 21:52:35 757

原创 《如果你想过1%的生活》 - 读后感

书中描述了很多场景,从各个角度解释了不同的人的不同面对现状,值得一读。下载地址:ebook 下载

2016-10-25 19:47:19 3158

原创 <<JavaScript Enlightenment>> note

> pdf下载:https://github.com/robertzhai/ebooks/blob/master/client/JavaScript_Enlightenment.pdf✴  An object is made up of named properties that store values.✴  Most everything in JavaScript can

2016-10-22 08:01:04 319

原创 go cgo

参考:https://golang.org/cmd/cgo/     cgo 可以在go中调用c语言的函数,实例如下,实例代码见 https://github.com/robertzhai/go/tree/master/go_programming_study/src/cgo1. cprint.gopackage main/*#include #include */i

2016-10-16 08:25:55 626

转载 对抗雾霾的健康饮食注意

在人口密集的大城市中,每当降温、刮风和下雨之后,阳光灿烂的日子过不了几天,雾霾就会重出江湖。钢筋水泥的森林中,车满为患的道路上,二氧化碳排放量巨大,绿叶植物很少,氧气似乎也比郊外更为紧缺,室内本来就憋闷得很,出门再戴个N95的口罩,实在是非常难受。经常会有人问:雾霾算是没法解决了,我们吃点什么才能清除它的危害呢?吃木耳银耳还是吃猪血来“清肺”?中国人的思维当中,特别喜欢用吃来解决一切问题。其实

2016-10-15 21:18:48 571

原创 zeptobuilder

自定义zepto包的库, :  http://github.e-sites.nl/zeptobuilder/  ,   库文档 http://zeptojs.com/

2016-10-14 10:34:05 749

原创 go testing

官方文档 点击打开链接demo 如下:sqrt.gopackage simplemathimport "math"func Sqrt(i int) int { v := math.Sqrt( float64(i)) return int(v)}add_test.gopackage simplemathimport "t

2016-10-13 21:08:11 460

原创 go linux install & config

今天配置了下开发机的go 环境,之前一直在mac开发,记录下配置,参考 点击打开链接1.download go wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz --no-check-certificate2.解压tar zxvf go1.7.1.linux-amd64.tar.gz -C

2016-10-13 11:16:57 570

原创 python book recommend: effective python

free to download https://github.com/robertzhai/ebooks/tree/master/server

2016-09-18 11:25:45 449

原创 flask wtf 表单校验总结

代码和文档见 https://github.com/robertzhai/python/tree/master/flask_coupon1. wtf 文档    http://docs.jinkan.org/docs/flask-wtf/2.使用 方法如下class CouponForm(Form): pid = StringField('pid', val

2016-09-14 14:54:41 2768

原创 tornado 异步模型学习和压测总结

压测工具、文档、代码请参考   https://github.com/robertzhai/python/tree/master/tornado-basic1.异步下载天气信息,@tornado.web.asynchonous装饰器#rate_async.pyclass IndexHandler(tornado.web.RequestHandler): @tornado.w

2016-09-13 17:52:33 1195

原创 mac 安装和配置 hhvm和nginx 总结

1. 前端nginx讲请求转发给后端的以fastcgi模式运行的hhvm2.hhvm installbrew tap hhvmbrew install hhvm3.nginx.conf server {        listen       8098;        server_name  localhost;        root /wwwroo

2016-09-09 07:23:47 1859

原创 supervisord 的使用

配置了一个机器学习模型的服务,用的nginx+gunicorn + python + supervisord里面关键的配置:supervisor.conf ==============[unix_http_server]file=/tmp/supervisor.sock ; (the path to the socket file)[ine

2016-09-06 16:55:08 295

原创 git clone error setting certificate verify locations

git clone https://github.com/google/protobuf.git 直接报错,修改成下面的即可。env GIT_SSL_NO_VERIFY=true git clone https://github.com/google/protobuf.git

2016-09-06 16:14:57 968

转载 python profile

类似php的xhprof的性能分析工具,见下两链接:http://python.jobbole.com/74266/http://xianglong.me/article/analysis-python-application-performance-using-cProfile/

2016-08-28 16:38:29 428

原创 简报就是职场竞争力

今天听林大班 (BeN)老师讲解 《时令绝杀技之像乔布斯一样做汇报》, 2小时的课程,收获满满,BeN 介绍:http://www.beforafter.org/bfacademy/

2016-08-24 19:27:20 466

转载 Why is epoll faster than select?

A typical server might be dealing with, say, 200 connections. It will service every connection that needs to have data written or read and then it will need to wait until there's more work to do. Whil

2016-08-24 14:15:10 460

转载 异步编程和事件模型

网络编程其实很大一部分的内容就是处理各种IO,对IO模型的理解,能使我们对UB模型机制更深一层的理解。特别是下面会说到的异步编程和事件模型。1. 同步阻塞IO同步阻塞IO模型如下图。Read,write这些操作,其实都是应用程序通过内核的系统调用完成的。为了执行read操作,应用程序会调用相应的一个系统调用(system call),此时系统控制权就交给内核,应用程

2016-08-22 19:49:44 1699

原创 scrpay 和 pyv8解析js,抓取天气预报数据

github项目地址:https://github.com/robertzhai/python/tree/master/scrapy/weather# -*- coding:utf-8 -*-import os,sysimport timeimport jsonfrom pyv8 import PyV8import jsonstr = '''{city:'济南',tqInfo

2016-08-18 18:06:59 2081

原创 scrapy 总结

1. scrapy 接受命令行参数def __init__(self,*args, **kwargs): super(SinopecsalesSpider, self).__init__(*args, **kwargs)启动spider 时 传 -a testkey=testval 通过 kwargs['testkey']获取2. cookie传递

2016-08-02 14:42:17 583

转载 Wireshark 抓包指南

http://www.liuhe.website/index.php?/Articles/single/20

2016-07-14 17:24:25 461

原创 vim ack

vim 项目地址: 我的blog1. brew install ackvim ~/.vimrc 增加"acknmap :Ack -i2.在项目目录 按F5 输入debug就能出现含有debug的文件列表

2016-07-14 09:08:20 735

原创 vim 环境配置

1. 安装 pathogenhttps://github.com/tpope/vim-pathogen2.安装nerdtree,command-t,taglist,vim-powerline,vim-sensible 这5个插件3. 安装效果图  tree -L 2 .vim.vim├── autoload│   └── pathogen.vim├─

2016-07-11 15:31:12 376

原创 yaf 安装和开发环境配置

1. 安装的话就是phpize 然后 configure,make ,make install 2. 添加yaf.so 到php.ini 重启php-fpm 3. nginx 配置 ,yaf官网给的不对,google了几个文档,算可以了server {        listen       80;        server_name  yaf.deb

2016-07-01 16:28:20 2452

原创 chrome Vimium plugin

1. downloadhttps://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb/related2. keyboard shortcut说明Vimium 插件可以使你在使用Chrome浏览器的时候,不用鼠标和触摸板。常用快捷键快

2016-06-30 17:38:56 662

原创 centos 6 下,zephir的安装和使用

1. install 参考 http://qinx.cn/zephir-installation-and-usage-centos6/ re2c 下载 wget http://downloads.sourceforge.net/project/re2c/0.16/re2c-0.16.tar.gz2.  使用例子http://www.codefrom.com/c/87

2016-06-24 18:25:03 151

原创 php-fpm listen sock 模式

1. touch /dev/shm/php-fpm.sock   chmod 777 /dev/shm/php-fpm.sock  chown www:www /dev/shm/php-fpm.sock2. nginx 配置     location ~ \.php$ {                #fastcgi_pass   127.0.0.1:9001; 

2016-06-24 12:00:37 6598

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除