January 19th, 2009 § § permalink
Just created my first wordpress plugin, from concept to implementation in 3 hours
. 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
January 19th, 2009 § § permalink
January 19th, 2009 § § permalink
Today was a good day as i learned some valuable lessons about django and nginx.
- ALWAYS close the database cursor in django, it can lead to some pretty wierd memory issues going forward.
- FIND the most optimal number of database connections you initialize for you connection pooling. This will let you optimize on memory going forward.
- 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
.
January 19th, 2009 § § 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.
December 26th, 2008 § § 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;
}