-
新鲜出炉
雁过留声
- RoR learning log (2) | 湖间小筑 on RoR learning log (1)
- PSY on Ruby learning log
- hzmangel on Ruby learning log
- Kevin on Ruby learning log
- Ivy on 2012,魔都开年
Tags
不明真相之围观
- Android中使用自定义Adapter - 4,019 views
- 让win下的vim支持非等宽字体 - 2,572 views
- C++中静态成员函数的声明及定义 - 1,348 views
- python中的静态成员函数 - 1,332 views
- VIM LaTeX Suite - 1,327 views
- List的Iterator - 1,069 views
- Pietty + Xming,在Win下用X - 1,025 views
- 给iphone传电子书 - 945 views
- AutoHotKey 设置窗口在最前 - 760 views
- 用AutoHotKey窗口平分屏幕 - 719 views
归个类
回忆
- May 2012 (3)
- April 2012 (1)
- January 2012 (1)
- December 2011 (1)
- November 2011 (1)
- September 2011 (1)
- July 2011 (2)
- June 2011 (1)
- May 2011 (2)
- April 2011 (1)
- March 2011 (3)
- January 2011 (2)
- December 2010 (4)
- October 2010 (2)
- September 2010 (2)
- August 2010 (1)
- July 2010 (3)
- June 2010 (3)
- May 2010 (2)
- March 2010 (5)
- January 2010 (7)
- December 2009 (5)
- November 2009 (2)
- October 2009 (1)
- September 2009 (5)
- August 2009 (3)
- June 2009 (1)
- May 2009 (4)
- April 2009 (2)
- March 2009 (1)
- February 2009 (3)
- January 2009 (3)
- December 2008 (6)
- November 2008 (14)
- October 2008 (5)
- September 2008 (11)
- August 2008 (8)
- July 2008 (9)
- June 2008 (21)
- May 2008 (17)
- April 2008 (17)
- March 2008 (15)
- February 2008 (1)
- January 2008 (3)
- December 2007 (1)
- October 2007 (12)
- September 2007 (8)
- August 2007 (9)
- June 2007 (8)
- May 2007 (10)
- April 2007 (3)
- November 2006 (5)
- October 2006 (2)
- September 2006 (16)
- August 2006 (13)
- July 2006 (4)
- June 2006 (1)
- April 2006 (1)
- March 2006 (6)
- February 2006 (1)
- January 2006 (3)
- December 2005 (6)
- November 2005 (15)
- October 2005 (12)
- September 2005 (1)
- June 2005 (4)
- May 2005 (12)
- April 2005 (16)
- March 2005 (6)
- January 2005 (13)
- December 2004 (3)
- November 2004 (8)
- October 2004 (13)
- September 2004 (13)
Category Archives: Happy coding
Deploy RoR application with Nginx
This article will talk something about deploying RoR application to local and remote nginx server.
RoR learning log (2)
This article will finish the ToDo web application, and the prime area in this article is adding validator and updating templates. Here is to RoR learning log (1)
RoR learning log (1)
Just back from vacation, so the study log for this week is simple.
Ruby learning log
Just studied Ruby with the tutorial on website rubylearning.com in the past week, and here are some knowledge gained those days.
List all CVS tags
最近在折腾一个CVS的库,需要把它里面所有的tags给列出来,在网上找了一个Perl脚本,以前一直是直接用的,那天看了看发现原来不是很难,于是写了一个Python的,为的是可以当成函数嵌到我的脚本中。
Simple Life Game in HTML5
想着好久没写blog了,刚好在看计算中的上帝时,里面有提到生命游戏,所以就顺手写了一个,顺便凑篇文章。
Blocking/Non-Blocking IO and SYN/ASYN IO
这是我上个月linuxfb版聚上讲的话题,因为后续还有一些讨论的东西,所以就一并在这记一下。估计下个月听完Bergwolf的AIO还会有些更新。
Get Return Value from popen System Call
popen的调用的返回值是popen自己的返回值,并不是被调用程序的返回值,如果需要取被调用程序的返回值,则需要先用pclose()取到返回的status信息,再用wait的宏进行判断。 int status = pclose(fp); if (status == -1) { printf(“Error reported by pclose()\n”); exit(1); } else { printf(“Process exited? %s\n”, WIFEXITED(status) ? “yes” : “no”); printf(“Process status: %d\n”, WEXITSTATUS(status)); } 其实是满早前问的一个问题,忘更新过来了。
Use TaobaoAPI in SAE
需求是这样的,有一批宝贝需要导入到淘宝的店铺中,但是淘宝助手支持导入CSV文件格式过于诡异,所以只好转向API。 本来就是一个拼POST参数发请求的事情,淘宝非弄出来一个lotusphp的框架,本机调试倒是满方便的,但是传到新浪的SAE上后,那满屏的warning看着那叫一个壮观啊。又不想再去学用别的第三方SDK了,于是开始打这个框架的主意。
Using Django in bluehost
最近由于某些操蛋的事情,linuxfb需要搬家,但是bluehost主机上不支持通过网页安装django,只好自己折腾了。 1. Install Python environment bluehost上提供的python的版本是2.4.3(谨慎怀疑是RH5的系统),嫌老,所以要升级。首先,需要从bluehost处申请获得SSH权限,具体做法去查网站帮助吧。 wget从服务器上下载源码包,然后解压编译安装三部曲,只是注意在配置的时间需要将安装的prefix目录改成自己家目录下的,否则没权限。在安装完成后记得把新python所在的目录加到$PATH环境变量中,然后可以使用python -V查看版本 2. Install Django in bluehost 安装Django,不想手动解压安装了,于是先安装了setuptools,接着用easy_install安装了Django。 3. Prepare the Django project 安装完Django后,可以在某处新建一个目录,然后把现有工程的整个目录拷过来。网上的教程中有说需要把setting.py的权限设成600,这样只有自己可读。如果工程中没有绝对路径,应该不需要对工程做任何更改。 bluehost中通过Apache+fastcgi的方式来支持Django的应用,所以还需要在工程目录下准备一个fcgi的文件,程序很简单,而且ms是通用的(具体的我没研究过,所以不知道怎么写) #! #coding:utf-8 import sys, os from os.path import abspath,dirname import sys sys.path.append(dirname(dirname(abspath(__file__)))) os.environ['DJANGO_SETTINGS_MODULE'] = "settings" from django.core.handlers.wsgi import WSGIHandler … Continue reading