September 8, 2013

MyUninstaller: An alternative to the default Windows Add/Remove utility

MyUninstaller is an alternative uninstaller utility to the default Windows Add/Remove program. The additional features provided by this utility are the display of details like product name, company, version, uninstall string, installation folder etc. of each of the applications and the ability to export the installed applications to a text/HTML file.

Some of the use cases where the exported file can be used: for references in case of migrating to a new computer or replicating to create a similar setup, taking automated snapshots to compare what has changed between two points in time, to share the configuration setup with someone else etc.

The tool is available for download at http://www.nirsoft.net/utils/myuninst.html.

August 17, 2013

Khan Academy: Rich repository of Educational Videos

Khan Academy accessible from http://www.khanacademy.org/ has huge number of free educational videos on a variety of subjects.

Though students are the ones who can benefit most here, this site can also be used by anyone interested in dusting the mind cabinet and doing a refresh!

August 6, 2013

Unix: more or less?

Commonly seen in Unix-based operating systems is usage of the command more to view paginated outputs. However, this command is quite old.

There exists the less command which has lot more functionality (like both forward and backward navigation) and is better performing as well (by not reading the entire file contents at the time of command invocation itself).

So, next time you want to use more, be frugal and use less instead – it is not useless though :)

July 23, 2013

Unix command: script

What is "script" command?

script is a very useful command that can be used to capture all that appears on a terminal. The output thus captured from the interactive session may then be useful while sharing with another colleague or team, or even used in a variety of debugging scenarios.

Next time you find yourself in a position to grab the screen/terminal contents, make use of this wonderful utility instead of relying on ad-hoc output redirections and screenshot captures.

What is its syntax and how do I use it?

Refer to the man pages on your system for the exact syntax/details, or an online resource like the one at http://unixhelp.ed.ac.uk/CGI/man-cgi?script. Typical usage however is along the lines of:
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]

Are there any interesting points to be noted?

One standard note is that interactive commands, such as vi, create garbage in the output file. Be aware of it as such and use "script" for capturing plain text.

Few oft missed aspects, though, are that it:
  • Invokes a new shell based on what is populated in the environment variable SHELL
  • Creates a new login session as can be seen from the output of last command

Why don't you show me a simple invocation and what does it result in?

Sure, I can :)

Here's a sample invocation of the command:
sh-3.2# script
Script started, file is typescript
sh-3.2# ls
bin  boot  dev  etc  home  lib  lib64  lost+found  media  misc  mnt  net  opt
proc  root  sbin  selinux  srv  sys  tftpboot  tmp  typescript  usr  var
sh-3.2# exit
exit
Script done, file is typescript
And, this is what is logged into the file:
sh-3.2# cat typescript
Script started on Tue 23 Jul 2013 04:10:04 PM IST
sh-3.2# ls
bin  boot  dev  etc  home  lib  lib64  lost+found  media  misc  mnt  net  opt
proc  root  sbin  selinux  srv  sys  tftpboot  tmp  typescript  usr  var
sh-3.2# exit
exit

Script done on Tue 23 Jul 2013 04:10:20 PM IST
sh-3.2# 

July 9, 2013

MobaXterm

I wanted to include a one-liner in the title of this Techbit than just the tool name i.e. MobaXterm - it was very difficult though. There are so many wide-ranged features integrated into one single app.

Listed below are some of the features/findings:
  1. Tabbed Console with UNIX-like interface – replacement for Console & accommodates part of Cygwin
  2. Tabbed Console with support for embedded terminal server sessions – replacement for PuTTY Connection Manager
  3. X-server client – replacement for X-based commercial tools like Exceed or Reflection-X
  4. Multi-Execution Mode – you want the same command to be invoked in parallel on several servers? Then, this is what you want.
  5. Ability to download files (SFTP/FTP) from the terminal session – In general, if you want to fetch a file while working on a terminal server session, then you open a separate file transfer app (like FileZilla) and then download it. This can all be done from the same session in this tool.
MobaXterm is free and available for download at http://mobaxterm.mobatek.net/.

June 22, 2013

Tip to open Word documents quickly

One tip to open word documents quickly, i.e. reduced time between when you double click the Word document and when the document is presented, is to press Esc key.

This prevents Word from making a connection to the printer (if any), which results in opening the document right away.

Those working and connecting to office network from home via VPN might find this tip even more helpful while opening word documents, especially if the computer is not connected to the VPN/printer or if the VPN connection is slow AND if you don’t need to print the document being opened.

In fact, Word presents this tip on the document’s status bar but it goes unnoticed mostly.

June 11, 2013

Wink: Screencasting Software

What is a Screencast?

As the Wiki page says, a screencast is a digital recording of computer screen output, also known as a video screen capture, often containing audio narration. The term screencast compares with the related term screenshot; whereas screenshot is a picture of a computer screen, a screencast is essentially a movie of the changes over time that a user sees on a computer screen, enhanced with audio narration.

Where or how are Screencasts useful?

If you want to create illustrative videos explaining how to use a specific software or its feature. If you want to report a bug and would like to do so by video capturing the exact steps that reproduce it. If you want to record your desktop for the purpose of record or afterwards replays. These are some of the scenarios that I could think of and I'm sure there would be more.

Now, what is Screencasting Software?

With the above explanation, one should be able to understand what Screencasting Software is meant by – it is that software that helps you in creating Screencasts.

Wink is one such software that is free and well reputed. Using Wink, you will be able to create screencasts and use in demonstrations, trainings or just for better illustration simply.

Wink (not the verb!) @ http://www.debugmode.com/wink/
Comparison of Screencasting software on Wiki @ http://en.wikipedia.org/wiki/Comparison_of_screencasting_software

June 5, 2013

E-Books Directory

http://www.e-booksdirectory.com/ is a very good source for hundreds of e-books in PDF or web/wiki based. Research works of many authors on a varied field of subjects are available here.

May 27, 2013

Unable to drag cell corner in Excel to auto-increment?

If you ever run into the issue of not able to get auto-incremented numbers when you drag cell corner in Excel, then this is for you.

  1. Select Office Button
  2. Select Excel Options
  3. Select Advanced
  4. Tick the check-box “Enable fill handle and cell drag-and-drop

Note that this is for Excel 2007. A similar option should be present in earlier/later versions as well.

May 23, 2013

File Shredder: Remove files permanently

One way to shred a file on your hard drive is to take its printout and then feed it through the physical shredder that you can usually find near your Office printer ;)

Jokes apart, “File Shredder” is a tool that can be used for shredding (destroying) unwanted files beyond recovery. Provided below are couple of paragraphs from the tool’s documentation to provide a quick overview. Go to the website for complete details and to download the tool.

Why is this tool required? There are quite a few software tools today for retrieval of deleted files under Windows OS. Those tools, often referred to as "file recovery" software, are taking advantage of shortcoming of Windows "delete" command that we all use regularly to delete files. Actually, the "delete" operation in Windows only removes bits of information from files so they appear deleted in OS. It is easy to retrieve those files using aforementioned specialized file recovery software.

In order to remove, or shred files permanently from your system, you have to use a program that is capable of rewriting the files with random series of binary data multiple times. This process is often called shredding. That way, the actual content of the file has been overwritten and the possibilities to recover such a shredded file are mostly theoretical.

http://www.fileshredder.org/

May 19, 2013

Reduce Microsoft Office document sizes

There are many ways to achieve reduced file sizes for your Office documents like Word or PPTs. This is very helpful if you are sharing the documents by email – enabling you to meet the etiquette of not clogging others’ mailboxes.

Tips to reduce document sizes
  1. Compress pictures
  2. Do not paste snapshots directly
  3. Turn off versions (revisions)
  4. Turn off Preview Picture
  5. Turn off Fast Saves
  6. Embed true type fonts only if required
Tips 1 and 2 turned out the most helpful as I found on lot of situations.

How to compress pictures?

  • Select a picture
  • Select “Picture Tools” on the window bar
  • Select “Format” section
  • Select “Compress Pictures” option.
  • Choose a resolution of 96 ppi (pixels per inch) – unless you want your recipient to print the images you sent over!

Note that the way to do these settings might vary a bit depending on the Office version (2003 or 2007 or later).

Do not paste snapshots directly

A common practice while embedding snapshots is to perform either “Print Screen” or “Alt + Print Screen”, and then paste it directly into your Word / PPT. However, the image is copied in BMP format in this case – leading to large document size. Instead, paste the snapshot into an image editor like MS Paint, save it into a format like JPEG & then insert the JPEG into your Office document.

May 13, 2013

Dia: Open source alternative to Visio

Dia looks to be a fair open source alternative to Microsoft Visio. Visio is licensed (not free) and it may not be available with everyone as such. This tool can be helpful in such scenarios. It can be downloaded from http://dia-installer.de/.

Provided below are additional links that you might find useful in this context:

http://www.makeuseof.com/tag/a-free-open-source-alternative-to-microsoft-visio/
http://www.osalt.com/visio
http://www.lucidchart.com/ (online and should be used only for non-official purposes)
http://inkscape.org/
http://www.networknotepad.com/

April 30, 2013

Oh! Big O?

If you had ever thought of “Big O” notation, which is used to represent algorithm complexity, as complex or something “which needs to be memorized”, then here is a very useful link for you.

A very simple and plain English explanation of Big O @ http://stackoverflow.com/questions/487258/plain-english-explanation-of-big-o/487278#answer-487278.

April 27, 2013

SSH or Telnet using Java

Ever wanted to find out how one can programmatically connect to a server or a network element like router, switch, firewall etc. using SSH or Telnet – specifically if the programming language is Java? If so, then JSch and Apache Commons enable you to realize it.

SSH in Java using "JSch"

JSch can be downloaded from http://www.jcraft.com/jsch/.
Examples can be found at http://www.jcraft.com/jsch/examples/.

Telnet in Java using "Apache Commons"

Apache Commons can be downloaded from http://commons.apache.org/.
Example can be found at http://commons.apache.org/proper/commons-net/examples/telnet/TelnetClientExample.java.

April 22, 2013

JD-Eclipse: Java Decompiler

JD-Eclipse is a plug-in for the Eclipse platform. It allows you to display all the Java sources during your debugging process, even if you do not have them all.

JD-Eclipse is free for non-commercial use. This means that JD-Eclipse shall not be included or embedded into commercial software products. Nevertheless, this project may be freely used for personal needs in commercial or non-commercial environments.

JD-Eclipse >> http://java.decompiler.free.fr/?q=jdeclipse

April 8, 2013

WinDirStat: Disk Usage Analyzer

WinDirStat is a disk usage analyzer that gives you a visual representation of what files are taking up the most space on your disk. It scans a disk and displays a treemap representing each file as a colored rectangle, the area of which is proportional to the file's size.

Here is a sample use-case: If you find a large file or two taking up loads of space that you had forgotten was/were there and don't need, it's very easy to find the culprit(s) from WinDirStat. Once the tool finds the files, you can either open the folders containing the large files in Windows Explorer, open the files directly, or delete the files altogether directly from the tool itself.

WinDirStat is located at http://windirstat.info/.

March 18, 2013

Startup Delayer

Sometimes, hearing it straight from the horse's mouth is much more beneficial compared to rephrasing and repeating. The topic of this Techbit is one such example. The below mentioned summary of the application "Startup Delayer" is taken from its website directly.

Does it take quite some time till your computer is ready to use after starting it up? Do you find your computer is really unresponsive even though you can already see the Desktop? Do you want more control over what starts on your computer? If so, you would definitely be interested in Startup Delayer that gives you the power to optimize your Startup Process by delaying applications from starting up as soon as you log into your computer.

When Windows loads its startup file, it attempts to load every program in there at the same time. Therefore if you have quite a lot of programs starting when Windows starts, each program will try and grab CPU and Disk time so that it can load. If each program tries to do this at the same time, you will soon notice the slow down that occurs due to your CPU trying to help all the programs to load, and your hard disk accessing multiple files.

Startup Delayer allows you to add some order to this process by determining the best time to launch your Applications. You can choose to do this based on how idle your computer is, or you can set an arbitrary time.

Startup Delayer can be downloaded from http://www.r2.com.au/page/products/show/startdelay.

February 24, 2013

How to find the count of physical processors, cores and threads on Solaris?

Let’s first understand the terms and relationship between the same quickly.

Physical processor – processor that is actually / physically present
Core – further division of physical processor i.e. a physical processor can contain multiple cores
Thread – a distinct execution path provided by a core i.e. a core can support multiple threads
Virtual processor – can be considered equivalent to a thread

That means, Number of virtual processors in a physical processor = count (cores) * count(threads).

psrinfo -p gives the number of physical processors

psrinfo -pv gives the number of virtual processors per each physical processor

But, how does one find the number of cores / threads on a physical processor? The only way that this could be found out is by going to the specs page on Sun/Oracle website. However, recent updates of Solaris 10 did include a fix to report this kind of detail. In case the fix is not there, it can still be found out from the command “kstat cpu_info”. For more details, you may refer to http://blogs.oracle.com/sistare/entry/cpu_to_core_mapping.

February 16, 2013

Unix: Why do “df” and “du” report different disk usages?

Let's understand the fundamental difference between the two commands first.

  • "df" reports usage based on details available at filesystem-level (inodes)
  • "du" reports usage based on the actual contents (files) of a directory

There are many reasons for the discrepancy between the numbers reported by the two commands. However, it is _mostly_ because of removal of a large file, the file handle of which is still present with a process (the file was opened by the process). When a file is removed, "du" no longer takes it into consideration although "df" counts it as the file inode is still present because of the open file handle - which is why "du" reports free usage where as "df" does not.

How do you fix the discrepancy in such cases? Simplest is by not removing the files that are held open by some process. However, if you do run into a situation of accidentally removing such files, restart the application/process that held the open file descriptor - this is the proper way to clean up. There is also a workaround of clearing the file descriptor manually/directly although it is not recommended procedure.

Another reason for the mismatch is that "df" counts the complete blocks (8 KB blocks, for example, as seen in the above techbit) where as "du" counts the actual file sizes (like 1 KB if the file is actually only 1 KB). If there is a large number of such small files, then the difference can show up significantly.

There are many other possible reasons as well for the mismatch. Provided below are few links for further reading:

http://linuxshellaccount.blogspot.com/2008/12/why-du-and-df-display-different-values.html
http://blog.thilelli.net/post/2008/10/18/Discrepancies-Between-df-And-du-Outputs
http://sysunconfig.net/aixtips/df_du_diff_out.txt

February 9, 2013

HJSplit: Split & Join Files

Have you ever wished you had the ability split a huge file into smaller files and then merge the smaller files back to recreate the original file?

Maybe, when you wanted to transfer the file from a computer to another using a USB drive but the USB cannot hold the whole file due to insufficient capacity? Or how about when you want to send a file over email but cannot either because the mail server does not allow attachments beyond a specific size? Or may be, the mail server allows but you want to avoid any issues with intermittent network connectivity breaks / issues by sending over the file in several different chunks?

If you answered a "Yes" to any of the above questions or if it simply sounds interesting/useful to you, then you should try HJSplit. It is a free file splitter and merger. It is obtainable from http://www.hjsplit.org/.

By the way, do let me know if you have any comments. If you find the posts helpful or if you think someone else can benefit from them, feel free to share the same.