Singleton pattern should be the most known design pattern out there(maybe the most overused design pattern as well). The idea is to restrict the object creation to only one instance. The typical way of achieving this is to declare the Singleton class’s constructor as private and then provide a static method to do the object initiation. This method would create ...
You host your web application with a hosting provider. Your application log/access IP address of your users and you get 127.0.0.1 or some other private IP. Deja Vu? Most likely reason for the above scenario is your hosting provider is using a proxy and the proxy server sits in the same machine or in the same network. Under a such ...
Traditionally git used to work only over ssh or git protocols while there was only a dumb version of git over http which was slow and inefficient. While this was ok for most of the time sometimes git needs to be able to work over http. Now starting from git 1.7 both git servers and clients have support for smart ...
In web applications sometimes you want to run processes that are seperated from the Request/Response cycle, like scheduled jobs that run at a specific time of a day. Scheduling such jobs in a unix environment is very easy with cronjobs. You just need to edit the crontab file and define a time and a command(a script to be run in ...
Finally it is time to go public on a project I had been working on. Enter Reegion, a social platform for localized content. In the ocean of Information it is hard to find content with a regional significance. The content could be in the form of News articles, images, videos or just opinion of a person. The best way for ...
Django-resolvetime is a Django filter to convert a python datetime object into a format that specifies the time difference between the time of the datetime and now. I developed this for a personal project of mine and decided to opensource since I could not find a filter available to get the job done. The code is hosted at http://code.google.com/p/django-resolvetime/. Installation ...
Django is the most widely used if not the most popular web framework among those available for python. Have a look at this report by Jacob Kaplan-Moss the co-creator of Django, to get an idea about the current standing of Django among the community. One disadvantage for Django is the lack of IDE support it has. Here it holds a ...
University of Moratuwa has been able to top the Google Summer of Code program, yet again. With 22 participating students university of Moratuwa was far ahead from the second place, University of Campinas Brazil which had 12 participating students. I’m glad i was a part of this success. Here are some stats of GSOC 2009.
Python has a simple yet powerful builtin module for debugging called pdb. Using this module you can debug your python code easily even without any IDE. 1. First step is to import the pdb module 2. Next step is to mark the entry point where the debugger would be called in. We use the set_trace() method for that. pdb.set_trace() 3. ...
Yes Linux been another piece of software, gets crashed once in a while. Once I used to work with a Ubuntu machine that after 10 hours of work would always get stuck when trying to shutdown. Luckily for Linux users there are some options before reaching for the power button. You can use a sequence of <alt + sysreq(Prnt Scrn) ...
Traditionally git used to work only over ssh or git protocols while there was only a dumb version of git over http which was slow and inefficient. While this was ok for most of the time sometimes git needs to be able to work over http. Now starting from git 1.7 both git servers and clients have support for smart ...
In web applications sometimes you want to run processes that are seperated from the Request/Response cycle, like scheduled jobs that run at a specific time of a day. Scheduling such jobs in a unix environment is very easy with cronjobs. You just need to edit the crontab file and define a time and a command(a script to be run in ...
Finally it is time to go public on a project I had been working on. Enter Reegion, a social platform for localized content. In the ocean of Information it is hard to find content with a regional significance. The content could be in the form of News articles, images, videos or just opinion of a person. The best way for ...
Django-resolvetime is a Django filter to convert a python datetime object into a format that specifies the time difference between the time of the datetime and now. I developed this for a personal project of mine and decided to opensource since I could not find a filter available to get the job done. The code is hosted at http://code.google.com/p/django-resolvetime/. Installation ...
Django is the most widely used if not the most popular web framework among those available for python. Have a look at this report by Jacob Kaplan-Moss the co-creator of Django, to get an idea about the current standing of Django among the community. One disadvantage for Django is the lack of IDE support it has. Here it holds a ...
University of Moratuwa has been able to top the Google Summer of Code program, yet again. With 22 participating students university of Moratuwa was far ahead from the second place, University of Campinas Brazil which had 12 participating students. I’m glad i was a part of this success. Here are some stats of GSOC 2009. ...
Python has a simple yet powerful builtin module for debugging called pdb. Using this module you can debug your python code easily even without any IDE. 1. First step is to import the pdb module 2. Next step is to mark the entry point where the debugger would be called in. We use the set_trace() method for that. pdb.set_trace() 3. ...
Yes Linux been another piece of software, gets crashed once in a while. Once I used to work with a Ubuntu machine that after 10 hours of work would always get stuck when trying to shutdown. Luckily for Linux users there are some options before reaching for the power button. You can use a sequence of <alt + sysreq(Prnt Scrn) ...
Ron Paul is one of those rare politicians who make sense more often than not but find it hard to make a big enough impact to actually change the status-quo. Why? I don’t know, maybe this whole democracy thing is a delusion, maybe you always need some special interest group behind you to win an election. I found this speech ...
Contrary to the hopes of West and anyone like me who would not mind a saner regime anywhere in the world that maybe, Ahmadinejad have won the Iranian presidential election and in a landslide too. There are stories of vote rigging and many malpractices but you should always think twice when Western media report on Iran. Whatever the malpractices that ...