Status update

Nothing new, really. 越来越不喜欢写blog了,也不喜欢发微博,以前经常发,是自己遇到了一些技术问题,找到解决方案了,会写一篇blog或者微博来记录下,现在越来越没兴趣写这些东西了,除了技术相关的,其它方面还真没什么好写的。 最近的事: 已经不能久坐了,坐一会就如坐针毡,实在忍不住了就站立办公了 不知为何,状态很差,注意力不易集中 现在这个时间段,成都天气开始转好, 整个冬天都是雾霾,只有最近2周才看到太阳 买车了,只周末开一下,开了几百公里, 路痴,手机导航也很不靠谱

March 19, 2014 · notsobad

New year resolution

Hello 2014! I’m 31 years old now, sadly. I wish myself in the new year: Less waste time, less unhappy, less overtime, more productive, more product, much more confidence.

January 2, 2014 · notsobad

creating deb package

最简单的,先参考这个 http://ubuntuforums.org/showthread.php?t=910717 ,建好目录,执行: dpkg-deb --build helloworld_1.0-1 即可生成deb文件,然后 # 安装 sudo dpkg -i helloworld_1.0-1.deb # 在包管理工具中搜索 sudo dpkg -l |grep helloworld # 卸载 sudo dpkg -r helloworld_1.0-1:i386

March 13, 2013 · notsobad

got a raspberry pi

买了个raspberry pi,折腾了下,还是挺好玩的。 基本的配置就参考的这篇文章:http://www.leiphone.com/raspberry-pi-hands-on.html 装了xbmc,参考的http://www.leiphone.com/raspberry-pi-hands-on.html ,另外装了samba,做文件服务器。

March 5, 2013 · notsobad

openwrt for mw4530r

参考:http://www.right.com.cn/forum/thread-85038-1-1.html http://www.right.com.cn/forum/thread-88895-1-1.html http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-factory.bin http://www.right.com.cn/forum/thread-85038-1-1.html

January 18, 2013 · notsobad

send file to remote rsync server

rsync配置: app@front:/tmp/log$ cat /etc/rsyncd.conf use chroot = false log file = /var/log/rsync.log [log] uid = app gid = app path = /tmp/log comment = xxxxxx read only = false client端目录: app@front:~/test$ tree . ├── 13223 ├── a │ ├── b │ │ └── c │ └── xxx ├── asdf └── now 3 directories, 4 files client端执行: app@front:~/test$ rsync -O -avz ./ rsync://x.x.x.x/log/ sending incremental file list 13223 asdf now a/xxx sent 267 bytes received 87 bytes 236.00 bytes/sec total size is 0 speedup is 0.00 看server端,已经同步完成。 ...

January 6, 2013 · notsobad

debug python using pdb

python -m pdb xx.py # 在xx.py的112行设置断点 b xx.py:112 # 运行直到断点处 c # 显示上下文源码 l # 打印当前局部变量 pp locals() 参考: http://docs.python.org/2/library/pdb.html http://www.doughellmann.com/PyMOTW/pdb/

November 26, 2012 · notsobad

vim tip for python

公司的代码python都是用tab分割,而现在的开源项目大部分是用空格分割。 可以做个单独的配置,在~/.bashrc中加入: alias vix='vi --cmd "set expandtab"' 所以需要编辑外部代码时,就用vix吧。

November 6, 2012 · notsobad

chrome developer tool show redirect net traffic

chrome的调试工具中,可以记录请求相应数据,但是如果存在页面刷新、跳转就看不到之前的流量了,所以对于表单提交就比较麻烦,找了好久,今天发现原来firebug、chrome的调试工具都支持这种情况的处理。 chrome是再network那个tab下,最下面状态栏处,有一个原点“Preserve Log upop navigation”, 需要记录跳转的情况时,点下这个按钮即可。 ...

November 6, 2012 · notsobad

introduce a project : HUGEpic

在hacker news上看到个项目:http://www.peterbe.com/plog/introducing-hugepic.io 是用来做大图片展示的,上传图片,压缩、切分,前端用地图的形式展示,里面用到的几个开源组件不错,可以了解下: tornado motor 一个给tronado用的mongodb驱动 rq 一个简单的基于redis的job queue Jpegoptim jpg压缩,不晓得和imagemagic对比怎么样 leafletjs 一个前端的map库 Leaflet.draw 可以在地图上画图的库 https://github.com/jacobtoye/Leaflet.draw

November 4, 2012 · notsobad