Django-Select2: Select2 for Django

Select2 Select2 is an excellent Javascript framework which transforms mundane <select> fields to cool looking and searchable. This is a very handy when there are quite a number of options to select from. Select2 also allows dynamic fetching of options from server via Ajax. Select2’s webpage has a neat demo of this. Django-Select2 Django includes […]

Quick bash command to mass rename files in numbered sequence

Just a quick bash command to rename all files in a directory in a numbered sequence. d=0; for i in *.jpg ; do d=$((d+1)); mv {“$i”,”$d.jpg”} ; done This is going to rename all jpg files in the directory to 1.jpg, 2.jpg, 3.jpg and so on.

ADF Super Code Snippets

Oracle’s ADF (Application Developer Framework) is J2EE technology stack to rapidly develop enterprise applications. As with all enterprise applications, ADF focuses on data handling and makes it quite easy to present the data to the users in variety of ways. As you will already know that ADF is a blanket term which encompasses many layers […]

How to Reset the Root Password of MySql in Linux

I am posting this for my future reference. Also it my help passers by. If you are using CentOS 6 (maybe others too). To reset the root password use the following steps:- sudo service mysqld stop sudo service mysqld startsos mysql -u root Now you will be at mysql prompt. Here type:- UPDATE mysql.user SET […]

iFlickr PHP Script: Create mRSS feed of interesting pictures on Flickr.com

Did you notice the “Flickr Gallery” on top right corner of the home page of this blog? The picture slide show is provided by Google’s Ajax Slide Show, but this post is not about that. Google’s Slide Show needs a mRSS feed, which it parses to get the list of thumbnails it wants to present. […]

Script that notifies via email when your server has updates

If you are the administrator of a server then you definitely understand the importance of keeping your system updated always. The following script will send you a mail whenever your server needs an update. The content of the mail will list out all the available updates. The script Notes: This script has been tested on […]