Linode + Nginx
Spent some time to remove the apache2 and mod_php from the linode, then compiled and installed nginx / php / phpfpm from scratch, with memcache + apc.
Result is 1 cool and fast and responsive web server. Yay~
The Power of Captcha
I was sick of clearing spam comments.
It was only a few of them. Now I have thousands of them. And WP doesn’t seem to have a select all / delete all interface for such comments.
So I go straight to the mysql database and remove them, with simple SQL command.
And next I installed a simple WP plugin called (obviously) simpleCaptcha. And (maybe not) amazingly, I don’t have a single spam comment since then (2,3 days so far).
Hope this keep the site clean for the time being. Good luck to myself.
Deploying Self-Signed Symbian App
I am doing some sort of symbian application development at the moment and this is totally new to me.
So I had been doing quite a bit of reading and now started some hands on to get myself familar with the IDE, build process, language conventions etc.
I managed to code up a simple console program, no GUI, and ran well in the Emulator. But I had been trying hard to deploy it on an actual symbian phone, a Nokia N95 to be exact.
So after two days of googling and trial and error, I finally managed to get it installed. But still unable to launch as I can’t see it under Application folder. I do see it appears under App Manager tho. May because I did not defined any icon ?
Anyway the points below are tips I found over the net for deploying self-signed Symbian App. I won’t explain why Symbian App need to be signed, you can google that yourself. I will just tell you that Signing Symbian (even signing it yourself) is a requirement for S60 3rd Edition onwards.
1) In the project mmp file, do not set the Vendor ID. Setting this will cause error saying something like “Unable to install protected app from untrusted source”
2) Set the UID1 to 0 and UID2 to unprotected range:
3) In PKG file, use unprotected range of value for UID, and shall be the same one used in mmp file:
4) Put in the correct platform / product ID else the phone might prompt that the application is not compatible:
Next I am gonna try out GUI stuff and also do developer signed application instead of self-signed.
谷歌输入法
刚刚安装了谷歌输入法,马上就上来blog试试看。看来还不错。
也许以后我可以用它来写一些文章或小说哩。
很久没有写中文了。因为不太会其它的中文输入法,用笔又好像太麻烦了。
不管怎麽样,以后我有什么好点子的话我就可以在这里发表了。呵。
Endless redirect loop in Apache
Just for my own future reference and sharing purpose.
I was merging some codes from collegue, which includes a install script which auto generates the .htaccess file and populate the MySQL database tables.
The project is based on CodeIgniter framework. There are two installer php scripts involved, both are called install.php. But one is placed at root level as entry point, the other as CodeIgniter controller under system/application/controller.
The problem is, after firing off the first install.php, it will generates the .htaccess file first, then it will do a redirect by using:
The first install.php works well: it generates the .htaccess file and does the redirect. But the redirect somehow re-run the same install.php at root level instead of the one in the controller folder.
After some tracing and googling, I found that it’s due to some apache configuration:
Changing it to:
fixes the problem. My understanding is MultiView allows URL without file extension and Apache will try to figure it out on the server side.
So in my case, http://localhost/install is the same as http://localhost/install.php and hence the endless redirect loop.
If anyone else had similar problem but have a different solution, I would like to know
ISP + MPAA ?
An interesting read here about aXXo created movie torrents:
http://www.independent.co.uk/arts-entertainment/films/features/scene-stealer-the-axxo-files-1214699.html
Matt Mason, author of The Pirate’s Dilemma, wrote that “when pirates enter our market spaces, we have two choices. We can throw lawsuits at them and hope they go away. Sometimes this is the best thing to do. But what if those pirates are adding value to society in some way?… In these cases, what pirates are actually doing is highlighting a better way for us to do things; they find gaps outside the market, and better ways for society to operate. In these situations the only way to fight piracy is legitimise and legalise new innovations by competing with pirates in the marketplace.”
So what kind of new innovations we can think of ?
I am thinking what if the movie creator (or any content provider) partner up with ISP to provide subscription based torrent download:
- Content provider, obviously, provides the contents
- ISP provides technial expertise
- Since ISP host the tracker itself, they can control who can download within the ISP network
- It’s a distributed distribution model, user will transfer among themselves, they don’t have to download everything from ISP server
The catch is, how to prevent user of re-distributing the content again. I doubt DRM will work (as if it does, it should be already working on MP3 … ). I will say it’s either you don’t do it, or you do it all out and partner with all major ISPs. Put up a price this is low and affordable and people do not see the point of downloading illegally.
Just check iTunes.
Another possibility is by streaming, where partial caching is done at user side but not full caching, so no one will have full movie at their PC. This is already done with products like PPLive, PPSteam. But a product coming out from a ISP shall be more promising. But this approach sounds not much different from video-on-demand, and usualy is paid per view I suppose ?
