04 2016 档案

摘要:[description]:def bootstrap(): host = 'ec2-54-xxx.xxx.xxx.compute-1.amazonaws.com' env.hosts = [host... 阅读全文
posted @ 2016-04-30 11:18 cn_wk 阅读(254) 评论(0) 推荐(0)
摘要:语法为 :[addr]s/源字符串/目的字符串/[option]全局替换命令为::%s/源字符串/目的字符串/g[addr] 表示检索范围,省略时表示当前行。如:“1,20” :表示从第1行到20行;“%” :表... 阅读全文
posted @ 2016-04-30 10:58 cn_wk 阅读(113) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/tk091/p/3859514.html使用gunicorn 来部署djangodjango写代码简单,但部署是个难题,今天终于发现gunicorn 这个好东西,与大... 阅读全文
posted @ 2016-04-29 23:04 cn_wk 阅读(88) 评论(0) 推荐(0)
摘要:netstat -lnp 阅读全文
posted @ 2016-04-29 22:03 cn_wk 阅读(36) 评论(0) 推荐(0)
摘要:PYTHON FABRIC实现远程操作和部署Python fabric实现远程操作和部署fabric作用环境配置hello world执行本机操作混搭整合远端操作多服务器混搭扩展fabrictitle是开发,但是... 阅读全文
posted @ 2016-04-29 13:11 cn_wk 阅读(83) 评论(0) 推荐(0)
摘要:函数:string.join()Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连... 阅读全文
posted @ 2016-04-29 12:39 cn_wk 阅读(120) 评论(0) 推荐(0)
摘要:gevent 安装1.安装libevent# wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar... 阅读全文
posted @ 2016-04-29 01:33 cn_wk 阅读(312) 评论(0) 推荐(0)
摘要:1.# wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm2.# r... 阅读全文
posted @ 2016-04-29 01:23 cn_wk 阅读(45) 评论(0) 推荐(0)
摘要:ln是linux中又一个非常重要命令,它的功能是为某一个文件在另外一个位置建立一个同步的链接.当我们需要在不同的目录,用到相同的文件时,我们不需要在每一个需要的目录下都放一个必须相同的文件,我们只要在某个固定的目... 阅读全文
posted @ 2016-04-29 01:11 cn_wk 阅读(136) 评论(0) 推荐(0)
摘要:在CentOS 6.X 上面安装 Python 2.7.XCentOS 6.X 自带的python版本是 2.6 , 由于工作需要,很多时候需要2.7版本。所以需要进行版本升级。由于一些系统工具和服务是对 Pyt... 阅读全文
posted @ 2016-04-29 00:47 cn_wk 阅读(66) 评论(0) 推荐(0)
摘要:nginx is not a part of base CentOS repository.But you can install EPEL repositiry to get nginx:yum install... 阅读全文
posted @ 2016-04-27 23:12 cn_wk 阅读(50) 评论(0) 推荐(0)
摘要:[翻译]理解PYTHON中的装饰器[翻译]理解python中的装饰器python的函数是对象函数引用手工装饰器装饰器阐述最后回答问题向装饰器函数传递参数装饰方法向装饰器传递参数练习:一个装饰装饰器的装饰器装饰器使... 阅读全文
posted @ 2016-04-27 16:33 cn_wk 阅读(89) 评论(0) 推荐(0)
摘要:在Python Web开发的世界里框架横行,但是不论是Django、Webpy、Bottlepy还是Tornado他们在处理Web请求时都有着相同的处理机制,即都要遵循WSGI协议的标准。本文首先分析Python... 阅读全文
posted @ 2016-04-27 14:41 cn_wk 阅读(483) 评论(0) 推荐(0)
摘要:1、下载源码 https://github.... 阅读全文
posted @ 2016-04-23 18:07 cn_wk 阅读(93) 评论(0) 推荐(0)
摘要:连接数据库1、打开setting.py,配置... 阅读全文
posted @ 2016-04-19 16:04 cn_wk 阅读(59) 评论(0) 推荐(0)
摘要:1、什么是模板 模板是一个文本,用于... 阅读全文
posted @ 2016-04-19 11:47 cn_wk 阅读(88) 评论(0) 推荐(0)
摘要:开发流程1、在myLesson中的views... 阅读全文
posted @ 2016-04-18 23:19 cn_wk 阅读(68) 评论(0) 推荐(0)
摘要:1、安装django1.7.5sudo pi... 阅读全文
posted @ 2016-04-18 22:03 cn_wk 阅读(98) 评论(0) 推荐(0)
摘要:登陆mysqlmysql -uroot -p... 阅读全文
posted @ 2016-04-18 21:54 cn_wk 阅读(46) 评论(0) 推荐(0)
摘要:sudo su如果 MySQL 正在运行,首先杀之: killall -TERM mysqldmysql 更改密码:update mysql.user set authentication_string=pass... 阅读全文
posted @ 2016-04-17 19:59 cn_wk 阅读(53) 评论(0) 推荐(0)
摘要:down voteacceptedYou forgot the 'url'url(r'^admin/', include(admin.site.urls)),url(r'^tinymce/', include('... 阅读全文
posted @ 2016-04-17 14:17 cn_wk 阅读(100) 评论(0) 推荐(0)
摘要:迫不及待要开始了吗?本页提供了一个很好的 Flask 介绍,并假定你已经安装好了 Flask。如果没有,请跳转到 安装 章节。一个最小的应用一个最小的 Flask 应用看起来会是这样:from flask imp... 阅读全文
posted @ 2016-04-04 16:41 cn_wk 阅读(153) 评论(0) 推荐(0)
摘要:到mysql官网下载安装 (1)点... 阅读全文
posted @ 2016-04-03 10:07 cn_wk 阅读(41) 评论(0) 推荐(0)
摘要:[solution]配置环境变量 - 在 ... 阅读全文
posted @ 2016-04-03 09:48 cn_wk 阅读(48) 评论(0) 推荐(0)
摘要:光标:上:k 下:j 左:h 右:l以单词为单位: 前e 后g 行尾:$nG 移动到第n行文档起点:gg 文档终点:G删除一行:dd 删除n行:ndd复制:y 粘贴:p撤销:... 阅读全文
posted @ 2016-04-02 22:52 cn_wk 阅读(47) 评论(0) 推荐(0)
摘要:spotlite打开多个terminal:在terminal内部, command+n 新建一个窗口 command +t 新建一个标签切换tab标签:command+shift+⬅️➡️mac 活动监视器... 阅读全文
posted @ 2016-04-02 14:56 cn_wk 阅读(69) 评论(0) 推荐(0)
摘要:yum命令无法执行There was a p... 阅读全文
posted @ 2016-04-01 01:05 cn_wk 阅读(125) 评论(0) 推荐(0)
摘要:[bug]socket.error: [Er... 阅读全文
posted @ 2016-04-01 01:00 cn_wk 阅读(206) 评论(0) 推荐(0)