Skip to content

Instantly share code, notes, and snippets.

@chappyhome
chappyhome / gist:6171462
Created August 7, 2013 05:30
svn 如何能不用每次都输入密码
settings--->Network-->ssh client:
"C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe" -l yongHuMing -pw miMa"
@chappyhome
chappyhome / gist:6433340
Created September 4, 2013 06:20
sublime2 编辑命令文件出现错误error如下: /bin/sh^M: bad interpreter
修改配置文件:sublime-settings的选项{"default_line_ending": "unix"}
@chappyhome
chappyhome / gist:6561986
Created September 14, 2013 13:21
ejs template no escape(不转义)
<%= name %> to <%- name %>
@chappyhome
chappyhome / gist:6885379
Created October 8, 2013 14:15
itunes未能连接到XXX,因为它已被密码锁定了 [复制链接] 之前设置了密码,放久了没点了。开机就显示“连接USB数据线”,点开itunes显示下图。请各位帮忙啊,该怎么弄。 现在关机也关不了,开机也开不了。如果要刷机求具体教程。
进入DFU模式刷机 具体:Power+Home10秒 黑屏2秒后,放开Power,继续Home5秒 iTunes监测到有处于恢复模式的iPod。你就成功了。 然后点恢复。等待其完成就OK了 有固件的话就Shift+恢复。选择固件。等待其完成
@chappyhome
chappyhome / gist:7051733
Created October 19, 2013 04:42
使用Package Control组件安装
按Ctrl+`调出console
粘贴以下代码到底部命令行并回车:
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
重启Sublime Text 2。
如果在Perferences->package settings中看到package control这一项,则安装成功。
@chappyhome
chappyhome / gist:7055514
Created October 19, 2013 13:05
MMseg中文分词 Chinese Segment On MMSeg Algorithm
#coding:utf-8
#!/usr/bin/env python
import xapian
import sys
import string
from collections import defaultdict
from mmseg.search import seg_txt_search,seg_txt_2_dict
@chappyhome
chappyhome / gist:7117899
Created October 23, 2013 12:39
Move django from SQLite to MySQL
When you start develop new site, you may run from little one with tiny database.
For django best start from sqlite and after some time, if you project begin grow you move to more serious database engine (MySQL, Postgre SQL etc).
Sadly, django does not have any ready tools to move from one to another database.
You may try
python ./manage.py dumpdata > data.json
and
python ./manage.py loaddata data.json
@chappyhome
chappyhome / recently
Created November 6, 2013 02:21
好久没写日志了
最近在忙这开发一个网站,开发平台从nodejs的Express到python的django. 开发风格迥异,这个网站目前叫[梦想读书社区][1],说是社区,其实读者间,还没有什么交互。这也是目前要考虑的问题。还有让我顾虑的是里面图书的版权问题,一直在想是不是去做博客之类的在线阅读且推送服务。为了开发,这两个月,少了许多时间陪家里的孩子老婆,让我很惭愧。而且开发完后,还有面临很多的问题。不管许多了。在这里先贴几张丫头儿子的照片吧。
![晚上散步,丫头在骑单车][2]
![enter image description here][3]
> Blockquote
> Written with [StackEdit](https://stackedit.io/).
[1]: http://www.deliverkindle.com/
[2]: https://lh5.googleusercontent.com/-DJfvUuUJejE/UncGUFcZ66I/AAAAAAAAFRU/udcEY_KbobA/s0/2013-11-03%25252020.55.06.jpg "2013-11-03%2020.55.06.jpg"
@chappyhome
chappyhome / gist:7338680
Created November 6, 2013 15:59
快速安装开发环境 centos
yum groupinstall "Development Libraries"
yum groupinstall "Development Tools"
@chappyhome
chappyhome / gist:7349928
Created November 7, 2013 06:20
django No module named defaults 出现找不到defaults 模块
django1.4版以后去掉了defaults