December 31, 2012

Find alternative web sites

If the last Techbit was to find similar software, then what is this one for? Similar people? Nah, this one is for similar web sites.

http://www.similarsites.com/ is where you can find sites similar to something.

As an example, a search for sites similar to sourceforge.net lists several good ones like those that can be seen from http://www.similarsites.com/site/sourceforge.net.

December 28, 2012

Find alternative software

You’ve some software but you’re not satisfied with it and need to find alternative options to the same? If so, then http://alternativeto.net/ is where you would need to go to. It is a great site and rates the software based on user recommendations.

December 8, 2012

How to find filesystem block size on Solaris?

Firstly, what is a filesystem block?

It is the smallest piece/size of the disk allocated or accessible on the filesystem.

Can you explain a bit more?

Having a larger block size helps in achieving better performance due to lesser number of disk reads and lower metadata overhead. However, it is a disadvantage for files of smaller size. For example, assuming block size of 8 KB, 8 KB is allocated even if the file size is only 1 KB.

Tell me how do I find the filesystem block size on Solaris?

There’re couple of ways:

  1. From “df -g”; example: df -g | grep "block size" | awk '{print $1 " " $4}'
  2. From “fstype –v”; example: fstyp -v /dev/dsk/c0t1d0s0 | grep ^bsize

November 25, 2012

System Explorer: Alternative to Windows Task Manager

System Explorer is an alternative to and a much better version of Windows Task Manager.

It provides you with an in-depth view of your system functioning and performance. It gives you much more detail than Task Manager that comes by default with Windows. For example, the list of files opened by a particular process, the list of network connections, process hierarchy (which process is invoked by which other process) etc. are some of the interesting additional features provided by this tool.

Download it from http://systemexplorer.net/.

November 18, 2012

How to delete browser autofill field value(s)?

Have you ever mistyped a username or a word in a text field of a form on a website? If autofill is enabled, the browser stores the (mis)typed word in its cache and associates it with the dropdown of that text field. In such cases, have you wanted to delete such words from the browser cache?

One way is to delete/clear all of your browser cache – which is not effective though as it wipes out all of the cache.

The way to delete only a specific entry from the cache is to use keyboard to navigate to the required value in the dropdown list and hit “Del”. In some of the older browser versions, “Shift” + “Del” may be needed. Note that this holds good for URLs in location bar as well.

November 11, 2012

µTorrent (uTorrent): Torrent Client

If you’re looking for a torrent client to download material like Linux ISOs, training videos or digital copies of CDs/DVDs that you own, then µTorrent (uTorrent) is the one you should go for. It is an excellent and lightweight torrent client while providing rich functionality and performing wonderful as well. Yeah, it's not for downloading movies or songs - remember that! ;)

µTorrent (uTorrent) can be downloaded from http://www.utorrent.com/.

October 29, 2012

Ninite: Install / Update Multiple Apps at Once

Got a new computer and need to set it up with your favourite applications? Ninite helps you to install and update multiple applications at once. It is available for download @ http://ninite.com/.

Note that it does not contain all the software/applications. However, it is still a very good idea and tool to be aware of.

October 25, 2012

Rename Multiple Files in Windows

“Bulk Rename Utility” is a utility that helps you rename multiple files in a jiffy. Few very good ways you can benefit from this tool are listed below:

  • Add/replace/remove text to/from the file names.
  • Support for regular expressions is a big plus.
  • Rename the files based on the EXIF header data of images.
  • Rename the files based on the ID3 tag data of MP3 files.
  • Preview the changes before applying.

The tool is available for download @ http://www.bulkrenameutility.co.uk/.

One downside is that the interface appears quite cluttered and not easily usable. As such, it takes a little time to get used to it.

October 22, 2012

Techbits #25: Cygwin – Unix on Windows!

Have you ever wished if you had the ability to use UNIX shells (like “bash”), commands or scripts on Windows to make yourself more productive from the resulting power and flexibility? And, should it be something free and not commercial like “MKS Toolkit”? If so, then this Techbit is for you.

Cygwin is what you are looking for and accessible from http://www.cygwin.com/. There are a huge number of packages available that you can install additionally to spruce up and spice up your Cygwin setup.

Go on and wake up your Windoze with Cygwin! :)

October 11, 2012

Techbits #24: “nslookup” works but “ping”, “telnet” etc. don’t?

This Techbit is for those souls that work on Solaris platform. It may be applicable on other Unix-based platforms as well but I've not verified it.

A friend of mine told me he has configured the name servers correctly in /etc/resolv.conf after which he could get "nslookup" working but not the other commands like "ping", "telnet" etc. Why?

The answer lies in that "nslookup" does DNS lookups using /etc/resolv.conf where as "ping", "telnet" etc. refer to /etc/nsswitch.conf to find out the mechanisms to use for name resolutions.  If DNS is not listed here, then /etc/resolv.conf is not going to be referred to. Therefore, make sure DNS is listed as a source for host resolution in /etc/nsswtich.conf.

Another command to do such verification is 'getent hosts' - this is like nslookup but pays attention to /etc/nsswitch.conf additionally.

Thus, to summarize which configuration file does each of the commands depend on:

nslookup - /etc/resolv.conf

ping - /etc/nsswtich.conf

telnet - /etc/nsswtich.conf

getent hosts - /etc/resolv.conf, /etc/nsswtich.conf

October 5, 2012

Techbits #23: Export comments from Word document

There could be scenarios where one encounters the need to export/extract all the comments from a word document into - say, a word document or an excel sheet. This techbit is precisely going to address such usecase.

All that you would need to do is define the following Macros and just use (run) them afterwards. The Macros can be seen by following the Word document's menu path "View >> Macros >> View Macros".

Exporting comments into an Excel file

Create a Macro named exportCommentsIntoExcel with the following definition:
Sub exportCommentsIntoExcel()

Dim cmt As Word.Comment
Dim doc As Word.Document
Dim commentsFile As String
Dim row As Integer

commentsFile = ActiveDocument.FullName & " - Comments.xls"

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add()

row = 1

For Each cmt In ActiveDocument.Comments
    objExcel.Cells(row, 1).Value = cmt.Initial & cmt.Index
    objExcel.Cells(row, 2).Value = cmt.Range.Text
    row = row + 1
Next

objWorkbook.SaveAs (commentsFile)

End Sub
Select the Macro thus created and "Run" it.

The comments should be available in an excel file in the same directory as the source word document and with the suffix "- Comments" in its name.

Exporting comments into a Word document

Create a Macro named exportCommentsIntoWord with the following definition:

Sub exportCommentsIntoWord()

Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document

commentsFile = ActiveDocument.FullName & " - Comments.doc"

For Each cmt In ActiveDocument.Comments
    s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr
Next

Set doc = Documents.Add
doc.Range.Text = s
doc.SaveAs (commentsFile)
End Sub
Select the Macro thus created and "Run" it.

The comments should be available in a word document in the same directory as the source word document and with the suffix "- Comments" in its name.

September 5, 2012

Techbits #22: How to find out if Oracle is SE or EE?

If you want to find out whether Oracle is Standard Edition (SE) or Enterprise Edition (EE), then this is for you. Now, why would someone be interested in finding it out? One reason could be to check which licensing option is the Oracle based on and correspondingly find out which features can be used.

There are several ways some of which are listed below; if you do not see “Enterprise”, it means it is “Standard”.
  1. banner displayed at sqlplus prompt
  2. select * from v$version
  3. If the above methods do not work (which could be because of DB not being created using Database Configuration Assistant aka DBCA), then do this: In the file “$ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml”, check the value (VAL) of the parameter ‘s_serverInstallType’ – SE or EE.

Source for this Techbit is at http://vicker313.wordpress.com/2009/05/16/how-to-check-oracle-10g-is-standard-or-enterprise-edition/.

How is Oracle licensed or what kinds of features does one get to use based on EE etc.? These are going to be addressed as part of upcoming Techbits.

August 26, 2012

Techbits #21: 7-Zip File Archiver

Here is a very good and popular file archiver: 7-Zip.

You might ask why would one require this when we already have WinZIP or WinRAR? Well, the first and major difference is that 7-Zip is open source while the others are commercial. The second difference is that 7-Zip supports better compression ratios.

7-Zip is available for download at http://www.7-zip.org/.

August 13, 2012

Techbits #20: Taskbar Sorter & Taskbar Shuffle

If you’re someone who is used to having the application windows in a specific order, like having Mail Client (Outlook) as the first window, Browser (Firefox) as the second window etc., then the utilities "Taskbar Sorter" & "Taskbar Shuffle" are for you.

While Taskbar Sorter only has functionality to sort/order the taskbar items, Taskbar Shuffle has additional functionality like the ability to reorder the tray icons as well.

Taskbar Sorter >> http://www.codeproject.com/KB/shell/taskbarsorter.aspx
Taskbar Shuffle >> http://nerdcave.webs.com/

July 30, 2012

Techbits #19: How can an XSD be constructed from an XML?

You have an XML file but do not have its schema definition (XSD). Now, you would like to get your hands on one of its possible XSDs. What do you do?

Helpful information on how to generate XSD from XML can be found at http://www.dotkam.com/2008/05/28/generate-xsd-from-xml/. This would be useful in getting you started when you encounter any necessity to build and provide schema definitions for XML files.

Specifically, "trang" is the open source utility, located at http://www.thaiopensource.com/relaxng/trang.html, that does the job fairly good enough. Note that there're other utilities as well but many of them are commercial.

Note that there are tools available online that require you to upload an XML file, which will then be processed after which its XSD can be downloaded. However, this approach poses security risks and cannot be used in the case of files carrying sensitive content. This becomes all the more critical in the case of any files related to your work as it could become a corporate violation. As such, this word of caution of not using online tools for official work has to be kept in mind at all times.

July 21, 2012

Techbits #18: Editing ClearCase files from Windows leads to ^M characters?

A common problem reported by developers accessing ClearCase VOBs/views from Windows is that the edited text files (like source code, scripts, configuration files etc.) contain Ctrl+M (^M) characters when they are checked-in eventually (or) when transferred to Unix-based servers like Solaris or Linux. This could lead to further build problems.

Most people try to get around this issue by replacing the additional Ctrl+M characters in the files on the Unix machines by using commands like "dos2unix" or "sed 's/^M$//g' ...". However, the issue has to be fixed at the source (editing in the first place) and not at the destination.

How to then fix the problem? By setting the file type properly in your text editor and ensuring that the file type is retained correctly in case of existing file edits. If your text editor (like Notepad or Wordpad) does not support setting these properties, you should consider switching to something else.

If you're using Notepad++, then this can be specified by following Settings >> Preferences >> New Document/Default Directory and setting the parameter "Format" to "Unix". Note that Notepad++ needs to be restarted to effectuate the change. Once restarted, you can verify by seeing UNIX in the status bar. In a similar manner, if you’re editing any existing UNIX-based text files, the status bar will show UNIX.

Similar options can be found in standard IDEs like Eclipse and others.

June 27, 2012

Techbits #17: Screengrab from Browser

What is a Screengrab?

As the term itself indicates, it is like a screenshot and grabbing the screen into the form of something like an image.

What is it useful for?

The screens can be used in a variety of scenarios like presentations, documentation, troubleshooting and so on.

How is this (screen grabbing from browser) different from PrintScreen / Alt+PrintScreen?

While PrintScreen/Alt+PrintScreen can be used to capture screenshots of the entire desktop/window, screen grabbing from browser means taking a snapshot of the webpage/website as it appears when you visit it. That means, you’ll be able to capture and save a webpage as an image. Depending on the tool, there are additional options which can be used to determine:

  • if the visible portion of the webpage is to be copied/saved
  • if the entire webpage is to be copied/saved
  • if a selection is to be copied/saved i.e. it prompts you for a selection and you’ll be able to select an area of a webpage
  • type of the image like PNG/JPEG/GIF/BMP

Alright; now that I understand the concept, which tools can I use to screengrab?

Provided below is a sample list of Firefox add-ons that can be used:

Screengrab - http://www.screengrab.org/
FireShot - http://screenshot-program.com/fireshot/
Pearl Crescent Page Saver - http://pearlcrescent.com/products/pagesaver/

If you use some other browser like Chrome or IE, you can search for similar or equivalent add-ons in respective browser's add-on library.

May 20, 2012

Techbits #16: HashCheck - Check the hashes!

I'm sure you would have come across situations where you needed to find out the hash values (like MD5, SHA-1 etc.) of files or directories to validate their integrity. If you had participated in any release readiness review meetings, then you would have needed to fill in the hashes for the files being delivered. Or when you've downloaded something and when you want to verify the file integrity, you would need to verify the hash of the downloaded file against what is published on the site. The utility "HashCheck" comes very hand in such cases.

HashCheck Shell Extension makes it easy for anyone to calculate and verify checksums and hashes from Windows Explorer itself. In addition to integrating file checksumming functionality into Windows, HashCheck can also create and verify SFV files  (and other forms of checksum files, such as .md5 files). It is fast and efficient, with a very light disk and memory footprint. And, of course, it is open source.

http://code.kliu.org/hashcheck/ is where you'd find this utility.

May 14, 2012

Techbits #15: Bookmarklets


Provided in this Techbit are shortcuts - no, not to happiness! - known as "Bookmarklets" that you could create and use to better your productivity. They're also referred to as "Favelets" sometimes.

I know what a bookmark is but what is a Bookmarket?

Bookmarklet is an enhanced form of bookmark. While a bookmark is static in nature and can be used to visit a fixed URI, a bookmarklet is dynamic and can be used to visit URIs constructed on various inputs. The input can either be based on a textbox prompted to the user or what you've selected on the webpage or even constructed automatically based on the context of the current webpage.

How to create Bookmarklets?

If you're a user of Firefox or Chrome, it's very simple; all you need to do is add a bookmark, name it appropriately and specify the Javascript code in the "Location" or "URL" part of it.

If you're a user of IE, it is time to start using either Firefox or Chrome :)

Are there some examples that I can use?

Yes, given below are few examples to serve as illustration; you can build much more complex ones. If you've selected any text, then the bookmarklet uses it; otherwise, it prompts you to provide the input.

<code>Dictionary</code> - This can be used to search for the words on dictionary.com. You can just drag the link to your Bookmarks bar. If it's IE, you can right-click on the link and choose "Add to favorites".

Here is the code used to create the bookmark:

javascript:void(q=getSelection());if(q%20==%20'')%20void(q=prompt('Enter%20word:',''));%20if(q)%20window.open('http://dictionary.reference.com/browse/'%20+%20escape(q));void(0)

<code>To English</code> - Thanks to www.labnol.org - This can be used to translate text using Google Translate. You can just drag the link to your Bookmarks bar. If it's IE, you can right-click on the link and choose "Add to favorites".

Here is the code used to create the bookmark:

javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;};

What more?

There's quite a lot of information available on the net in this regard. The aforementioned samples are just a tip of the iceberg. Apart from these, there're lot more general bookmarklets that can be used to effectuate better productivity during your browsing. Few links are provided below for further reading:

http://marklets.com/
http://www.mvps.org/dmcritchie/ie/bookmarklets.htm
http://www.labnol.org/internet/guide-to-useful-bookmarklets/7931/

April 12, 2012

Techbits #14: Console - Enhanced CLI for Windows

First, a Techbit for tabbed text editor in the form of Notepad++. Then, a Techbit for tabbed browser in the form of Firefox. And then, a Techbit for tabbed Telnet/SSH terminal emulator in the form of PuTTY Connection Manager. What else could one ask for, huh? Well, one could ask for a Techbit for tabbed version of command line client for Windows.

If you find yourselves working from the command line interface on Windows, then you'd have experienced all the niceties of the default "cmd.exe"! This is where "Console" comes to your rescue which is an enhancement for the Windows console and solves many problems.

Aside from the tabs (which in itself is pretty great), Console adds copy and paste functionality to the command line along with several display tweaking options (color, transparency, etc.) and fully-configurable keyboard shortcuts.

You can download this from http://console.sourceforge.net/.