First wordpress plugin : Kwippy poster 1.0

January 19th, 2009 § 4 comments § permalink

Just created my first wordpress plugin, from concept to implementation in 3 hours :D . This plugin basically posts an update on kwippy when you publish a new blog post. This can be a good tutorial for someone trying to build their own plugins actually. Enjoy.

Updated:
Official WordPress plugin page :
http://snipper.in/86

The Screen Savers! – NES PC

January 19th, 2009 § 0 comments § permalink

Very cool … though i seem to be nearly 4 years late.

Nginx + django fcgi lessons

January 19th, 2009 § 2 comments § permalink

Today was a good day as i learned some valuable lessons about django and nginx.

  1. ALWAYS close the database cursor in django, it can lead to some pretty wierd memory issues going forward.
  2. FIND the most optimal number of database connections you initialize for you connection pooling. This will let you optimize on memory going forward.
  3. ENSURE that you do not set a very high client_timeout, this means that if connections are not explicitly not closed by the client then the web server will not timeout. This results in bad memory behavior for the fcgi threads.

Well, this has solved my major issues with respect to kwippy. Also learned that GIFs are very fundamentally different than JPEGs which results in a lot of problem when used in the python imaging library. All in all a good day :D .

Microsoft remote terminal from linux

January 19th, 2009 § 0 comments § permalink

I know it would be simple for a lot of people reading this blog :) . But the easiest way to remote desktop into a windows machine using a X based linux distro is to install rdesktop.

http://www.rdesktop.org

For ubuntu and debian based distro, fire up the console and type

sudo apt-get install rdesktop

This would install the client.

rdesktop <server IP/domain>

This would fire up the windows remote desktop stuff.

PHP + nice URLS + nginx

December 26th, 2008 § 0 comments § permalink

Easiest way to get php with good looking urls running on your site . Works for drupal, wordpress and joomla.

server {
listen 80;
server_name www.domain.com;
index index.html index.htm index.php;
root /path/to/domain/files;
location / {
error_page 404 = //e/index.php?q=$uri;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /path/to/domain/files$fastcgi_script_name;
}
access_log /usr/local/nginx/logs/domain.access_log;
error_log /usr/local/nginx/logs/domain.error_log;
}