X

Recent Posts

Tips

How to create a custom IE8 Accelerator

Microsoft has introduced a new feature in Internet Explorer 8 called "Accelerators". These accelerators help you quickly perform your everyday browsing tasks without navigating to other websites to get things done. Simply highlight text from any webpage, and then click on the blue Accelerator icon that appears above your selection to perform the respective task.How to create an "Accelerator"?Well it's a pretty simple two step process:1. Create XML file2. Create accelerator installation linkLet us create a simple accelerator which queries IMDB for movie titles and displays the result.IMDB AcceleratorOn closer observation, we find that URL for search page of IMDB is of formhttp://www.imdb.com/find?q=SearchStringwhere "SearchString" is the string you are querying for. With this information, lets start making the accelerator.Step 1: Create XML File<?xml version="1.0" encoding="UTF-8"?><openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0"><homepageUrl>http://www.imdb.com </homepageUrl><display> <name>Search IMDB </name> <icon>http://www.imdb.com/favicon.ico </icon></display><activity category="Search"><activityAction context="selection"> <execute action="http://www.imdb.com/find"> <parameter name="q" value="{selection}" type="text" /> </execute></activityAction></activity></openServiceDescription>This XML file is called the service description file and it contains specific description about the service provider and type of service it provides. The {selection} value on Line 11 refers to the text that you may highlight on a web page before performing the search. Save this file as search.xml.Step 2: Create accelerator installation linkTo let users use our accelerator, we will create a install button. Users can install the accelerator using this link. Here the code for link:Install AcceleratorInstall AcceleratorThat's it, you are done. Install the accelerator and start searching.You will find your accelerator in "All Accelerators" context menu item.

Microsoft has introduced a new feature in Internet Explorer 8 called "Accelerators". These accelerators help you quickly perform your everyday browsing tasks without navigating to other websites to...

Tricks

How to send message to users logged on to a UNIX terminal?

One of the cool features of UNIX is that you don't need to have any software installed to send message to users logged on to that machine. There is a handy command called "write" which enables you to do this. Here is the syntax of this command:$write username ttyNow the question arises, how to know the tty of a particular user. The "who" command of UNIX comes in to play here. Just shoot "who" command on your terminal and see the magic. You will receive the list of all users logged on to that machine with their tty. Below is an example.$whoroot :0 May 7 03:51root pts/1 May 7 03:51 (:0.0)root pts/2 May 7 03:51 (:0.0)user5 pts/10 May 7 04:17 (dhcp-dwf1-4-10-176-162-74)user8 pts/13 May 7 04:12 (dhcp-dwf1-4-10-176-162-180)user9 pts/15 May 7 04:12 (10.176.146.212)user7 pts/14 May 7 04:23 (dhcp-dwf1-4-10-176-162-118)user12 pts/18 May 7 04:14 (dhcp-dwf1-4-10-176-162-119)user11 pts/23 May 7 04:14 (dhcp-dwf1-4-10-176-162-31)user1 pts/22 May 7 04:27 (dhcp-dwf1-4-10-176-162-125)user15 pts/24 May 7 04:14 (dhcp-dwf1-4-10-176-162-65)user6 pts/12 May 7 04:14 (dhcp-dwf1-4-10-176-162-120)user2 pts/28 May 7 04:14 (dhcp-dwf1-4-10-176-162-60)user7 pts/30 May 7 04:14 (dhcp-dwf1-4-10-176-162-118)user4 pts/31 May 7 04:14 (dhcp-dwf1-4-10-176-162-72)user10 pts/32 May 7 04:14 (dhcp-dwf1-4-10-176-162-68)user14 pts/33 May 7 04:14 (dhcp-dwf1-4-10-176-162-27)If you want to send message to user8, issue following command at your terminal:$write user8 pts/13Now write any message you want. To end the message, press Ctrl+D. Your message would be sent.

One of the cool features of UNIX is that you don't need to have any software installed to send message to users logged on to that machine. There is a handy command called "write" which enables you to...

Tips

How to find out CPU utilization in Linux?

Everyone knows that CPU utiization in windows can be found out from Windows Task Manager. But what about Linux? Well Linux has also got set of utilities to monitor CPU utilization. With these commands you can find out total CPU utilization, individual CPU utilization (for SMP machines), your system's average CPU utilization since the last reboot, determine which process is eating up your CPU(s) etc.Good old "top" commandThe top command provides dynamic view of CPU utilization. It displays system information as well as list of tasks currently managed by kernel. Is also displays uptime, average load, physcal and swap memory utilization. Syntax of top command is as follows:$ topTo quit "top", you have to press Q key of your keyboard.Using "mpstat" commandTo use this command, you have to install a package called sysstat. For Ubuntu or Debian systems, you can install this package using apt-get.$ apt-get install sysstatTo get CPU utilization information, type in following command:$ mpstatTo monitor individual processor performance, issue following command:$ mpstat -P ALLThe "sar" commandTo display CPU utilization using "sar", use following command:$ sar -u 2 5tThis command will display CPU utilization 2 seconds apart, 5 times as shown below.The "iostat" commandThe iostat command reports Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions. It can be use to find out your system's average CPU utilization since the last reboot.$ iostatGUI ToolsKDE desktop environment has a system monitor utility whic shows CPU utilization as well as many more information. You can also kill a process using this utility as shown below:It also gives CPU load information, physical and swap memory usage data in graphical format as shown below:For learning more about above commands and their options, you can go through their man pages.

Everyone knows that CPU utiization in windows can be found out from Windows Task Manager. But what about Linux? Well Linux has also got set of utilities to monitor CPU utilization. With these commands...

Blogging

Configuring ScribeFire for Movable Type

ScribeFire Blog Editor is an excellent add-on of Firefox for drafting blog posts right inside your browser. ScribeFire Blog Editor enables users to easily drag and drop formatted text from the web into their blog(s), post entries, take notes, and optimize their ad inventory directly through the Firefox browser. In this post, I will tell you how to configure it for Movable Type.Install ScribeFire from Firefox Add-ons website. Click here to go there.After installation, start it by clicking it's icon in lower-right corner of your browser.Click on Add button to add your blog.Enter your blog's url. Click NextChange the blog type from MetaWeblog API to Movable Type and API URL to http://blogs.oracle.com/mte1521/mt-xmlrpc.cgi. Select the Advanced Settings check box. Enter the API Key. Click Next.In Login Details, put your username without oracle.com (e.g. pranav.prakash in my case). In password field, again put the API key. Click Next.You can see your blogs in this screen. Click Next to go to next screen.Click Finish to add blogs.This completes the configuration of ScribeFire for Movable Type. Happy blogging with ScribeFire.Note- Your API key is same as Web Services Password which you can find on your User Profile page.

ScribeFire Blog Editor is an excellent add-on of Firefox for drafting blog posts right inside your browser. ScribeFire Blog Editor enables users to easily drag and drop formatted text from the web...

Tips

Switch between different JDK versions in Windows

Being a Java developer, I always compile and test my code on different Java versions. But switching between them is a huge problem. So finally I found an easy method to do this. You have to create following batch files and place them in directory you open your command line in or in SYSTEM PATH. You can use you favorite text editor to create these files.jdk14.bat@echo offecho Setting JAVA_HOMEset JAVA_HOME=C:\j2sdk1.4.2_12echo setting PATHset PATH=C:\j2sdk1.4.2_12\bin;%PATH%echo Display java versionjava -versionjdk15.bat@echo offecho Setting JAVA_HOMEset JAVA_HOME=C:\Program Files\Java\jdk1.5.0_12echo setting PATHset PATH=C:\Program Files\Java\jdk1.5.0_12\bin;%PATH%echo Display java versionjava -versionjdk16.bat@echo offecho Setting JAVA_HOMEset JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11echo setting PATHset PATH=C:\Program Files\Java\jdk1.6.0_11\bin;%PATH%echo Display java versionjava -versionMake sure you assign the appropriate JAVA_HOME value in batch files, according to your Java installation. Whenever you want to switch between Java versions, just run the respective batch file and you are done.Note- JAVA_HOME and the path to java must always refer to the exact same version of the JDK. If you mix them up, unpredictable things will happen!

Being a Java developer, I always compile and test my code on different Java versions. But switching between them is a huge problem. So finally I found an easy method to do this. You have to create...