Posts

Reviving this blog after almost 10 years

Image
From last month I was thinking on starting a blog to share my experiences and opinions. Remembering a time when I was novice and started this blog to share mostly technical stuff I learned. Searching through old emails I found lot of old conversations along with this blog details. So, why not use this blog! What's wrong in reusing and reorganizing old stuff when we can.  Hopefully will start from updating profile. 

Jquery: Get Focus on First Field of Form

Put this in jQuery Document Ready event and you will get focus on Forms first field. $("form:not(.filter) :input:visible:enabled:first").focus(); This is very useful when there are many forms.

Bulk Resize of Images. - Linux

Want to do easy and quick Resize of bulk Images.  below command is the best solution. To run below command, ImageMagick needs to be installed. find ./ -name "*.jpg" -exec mogrify -resize 50% {} \; Above command will navigate to the all the Folder and Subfolder and shrink all jpg(s) to 50%.

Reseed or Reindex Primary Key - SQL Server

Dealing with database sometimes requires to Reindex the Identity Column or Primary Key to Reindex. Below is the command or Query to be run on SQL Server to Reseed / Reindex Identity column for SQL Server. DBCC CHECKIDENT (tablename, reseed, 10) Above statement will return current max value and reseed the identity from the value given as last parameter. Here 10 is value to start from.

Creating Password Protected Webpage / Website

Some time if you want your website or webpage to be displayed to selected people or you do not want other people to see what is behind the Page. That time you need to create password protected Site. So today I decide to share basic steps for the same. 1. You need to create file named - .htaccess 2. Write below code in .htaccess AuthUserFile /yourserver/fullpath/where.htpasswdresides/.htpasswd AuthGroupFile /dev/null AuthName "Whatever Name you want to displayed with Prompt " AuthType Basic require user Usernameyouwant  3.  create .htpasswd file on your linux system by typing command.  htpasswd -c .htpasswd  Usernameyouwant   4. Upload both file to server. There is also online utility available here:  http://www.tools.dynamicdrive.com/password/

Ant Philosophy by Jim Rohn

I was surfing the web and I came across to very good resource of Jim Rohn 's Ant Philosophy. I have decide to share with you all. Ant Philosophy divided into 4 parts, mentioned below : 1. Never Give Up 2. Look Ahead 3. Stay Positive 4. Do All You Can Courtesy: The Ant Philosophy   Read full story here.

True ;)

Programming teaches us to be good managers. !!!

YSlow - Plugin for Firefox & Website Optimization

There are tools to check the website performance. I mostly use Firebug to get overall time taken to load resource. However one another good plugin is YSlow . Take a look and try it out. Courtesy:  Firefox addon