August 2011
1 post
3 tags
Vim plugins I use and mini installation/usage... →
I am a vim user, and by user I mean I do all(not counting using the textarea inside the web browser) of my editing inside vim. Even when I need to use a word processor, I first type my content inside vim and then open the word processor to format it. Check my new blog post on list of vim plugins I use on daily basis along with mini tutorials on installation and usage.
Aug 13th
11 notes
July 2011
1 post
2 tags
(Django) A simple template tag to add an 'active'...
A common task in a web developer’s day to day work is to add an ‘active’ class to anchor tags for styling the link to currently active page. In PHP world, this generally involves anĀ if-else chain. But how do we do it in Django? I searched the web but couldn’t find anything specific; therefore I coded a simple template tags for the purpose. This little template tag can be...
Jul 12th
3 notes
October 2010
2 posts
3 tags
Fix "can't find easy_install executable [Errno 2]"...
Today, when I tried creating a new virtual environment for a project, it failed with the following error. I guessed that it should have something to do with replacement of setuptools with distribute recent versions of virtualenv(because it could not find easy_install executable) and since as we know that python packaging is outdated and brain dead on Linux distos(at least on Ubuntu in my case), I...
Oct 25th
2 notes
6 tags
Make Django forms.ChoiceField accept choices from...
Recently I faced a problem in one of our Django project where I had to display drop down select box and checkboxes on a webpage which on initial page load had a about 20 - 30 choices. These choices could change via Ajax depending on the actions performed by the user. Also the choices come from a pool of hundreds of thousands of possible values. Default forms.ChoiceField provided by Django,...
Oct 17th
1 note
August 2009
1 post
2 tags
Generate ordinal, easy way in PHP
After going through lot of custom functions for generating ordinal number in PHP, I was finally able to find the best way (so far) for doing it. What’s happening here? Since the PHP date function only considers valid number range from 1 to 31 for the day parameter, the modulo operator keeps it in this rang. The number that has to be shown as the ordinal as 4th parameter to the mktime...
Aug 29th
19 notes
May 2009
2 posts
Multisite Drupal Install Using Single Database
This post is in continuation to Multisite Installation In Drupal 6. In the previous post mentioned above, we were using separate databases for each site within the same drupal core. There will be requirements where you will be required to have a single database to be shared among multiple drupal site installs. One important requirement being sharing of user access. It will be quite possible that...
May 19th
Multisite installation in drupal 6
Assuming you have basic drupal 6 installation already working on a LAMP server. Below are the steps to setup multiple sites to work on same drupal core like site1.com, site2.com etc. Create site databases Start by creating databases for each site like site1, site2 etc thereby setting specific credentials to each database created. Setup drupal site configuration directories Copy and paste...
May 14th
1 note
March 2009
8 posts
1 tag
Detect javascript like a pro →
Mar 16th
5 tags
Mar 11th
IE8 might the last of our(web devs) miseries →
It seems like IE’s successor has been confimed to be “Gazelle”, a browser currently under development at Microsoft Research. It is said to be more secure than FireFox and Chrome; keeping plug-in’s sandboxed within the browser, so it will not affect the PC if you stumble upon some malwar
Mar 11th
Sharpen your saw before you chop the tree →
Mar 10th
Benjamin Franklin thought of unix and open source... →
Mar 10th
DHH: "Real World! Go to hell" →
DHH aka David Heinmeier Hansson(yes I intend what I wrote), as most people know him as the creator of Ruby on Rails framework, is often thought of as an arrogant brat and a guy who blurts out FU at a slights provocation(and sometimes, even without provocation). At least that is what I thought of him until I read this post. Thanks Peter for showing us real DHH(if it is true).
Mar 10th
5 tags
Mar 10th
Announcing "Krafting Synergy" - Official...
I am very glad to announce “Krafting Synergy” the official Team Blog of iKraft Software. We, as a team, daily face new challenges, solve tricky problems, learn new things and above all have fun. We are passionate about every thing we do as a team. And we love to share our experiences, both good as well as bad, with the world. That is exactly the intention behind this initiative: ...
Mar 10th