摘要: virtualenv可以搭建虚拟且独立的python环境,可以使每个项目环境与其他项目独立开来,保持环境的干净,解决包冲突问题。一、安装virtualenvvirtualenv实际上是一个python包,所以我们可以用easy_install或者pip安装。下面介绍在CentOS系统上的安装方法... 阅读全文
posted @ 2015-08-14 21:08 圆旭 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 在具体的Django应用中,通过引入django.conf.settings使用配置,例:from django.conf import settingssettings.configure(DEBUG=True, TEMPLATE_DEBUG=True, TEMPLATE_DIRS=('/h... 阅读全文
posted @ 2015-08-14 21:01 圆旭 阅读(3923) 评论(0) 推荐(0) 编辑
摘要: 昨天问我/usr/lib 和/usr/local/lib 我仅记得一个是系统的,一个是用户的,于是今天查了查,有两篇文章介绍的不错,usr 很多人都认为是user缩写,其实不然,是unix system resource缩写,第二篇文章说的更详细。可以看另一篇博文。转载:http://flash77... 阅读全文
posted @ 2015-08-13 20:56 圆旭 阅读(2147) 评论(0) 推荐(0) 编辑
摘要: 方法一:修改文件 ~/.pydistutils.cfg为:[easy_install]index_url = http://pypi.douban.com/simple方法二:直接在setup.py的同目录放置一个setup.cfg:[easy_install]index_url=http://py... 阅读全文
posted @ 2015-08-12 20:20 圆旭 阅读(1244) 评论(0) 推荐(0) 编辑
摘要: 配置文件位置:1.linux~/.pip/pip.conf2.windows%HOME%\pip\pip.ini配置文件内容:[global]index-url =http://pypi.douban.com/simple注:optional,以下也可以加到上边所示的配置文件中。1.trusted-... 阅读全文
posted @ 2015-08-12 18:15 圆旭 阅读(297) 评论(0) 推荐(0) 编辑
摘要: lsof -i:端口号转自:http://my.oschina.net/u/193184/blog/146885 阅读全文
posted @ 2015-08-12 16:51 圆旭 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 取消私钥中的密码:1. 使用openssl命令去掉私钥的密码openssl rsa-in~/.ssh/id_rsa-out~/.ssh/id_rsa_new2. 备份旧私钥mv~/.ssh/id_rsa~/.ssh/id_rsa.backup3. 使用新私钥mv~/.ssh/id_rsa_new~/... 阅读全文
posted @ 2015-08-12 11:46 圆旭 阅读(1724) 评论(0) 推荐(1) 编辑
摘要: 1)curl -L get.rvm.io | bash -s stable2)把下面一行加到~/.zshrc中:[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"3)source ~/.zshrc4)修改rvm的ruby安装... 阅读全文
posted @ 2015-07-30 15:29 圆旭 阅读(889) 评论(0) 推荐(1) 编辑
摘要: 刚好找到了一个临时的解决方法,chrome其实已经内部实现了断点续传功能,不过应该还没完善,所以要自己打开。方法:用chrome在地址栏输入chrome://flags用搜索找到resumption(断点续传),打开就可以了转自:http://www.zhihu.com/question/19895... 阅读全文
posted @ 2015-07-23 15:04 圆旭 阅读(1904) 评论(0) 推荐(0) 编辑
摘要: ls|wc-l转自:http://bbs.csdn.net/topics/60387132 阅读全文
posted @ 2015-07-23 10:40 圆旭 阅读(124) 评论(0) 推荐(0) 编辑