Friday, April 29, 2011

Screenshot software: Greenshot

If you have been spoilt by SnagIT (made by Techsmith) which is probably one of the best screenshot tool out there and are now looking for a free alternative, you may find Greenshot to be a pretty good replacement. Greenshot lets you edit, add additional text, pointers on top of the snagged images.

How to run command on one windows PC from another

If you don't know about it yet, psexec is a nice utility which allows you to run a windows command on one PC from another. Here is an example:
psexec \\remote-machine C:\RunBatchFile.bat

Run a Unix command remotely from Windows


After helping a customer numerous times by diagnosing a failed cron job, I was looked up how to call the job from Windows. This turned out to be interesting given it was a command which could only be run from sudo. Here are the details:

  1. First you need a program called plink which is part of the putty distribution. You can download putty from  http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe
  2. Create a text file with your commands somewhere on the PC. For example:
    1. /usr/bin/sudo su -
  3. Either set up your path environment variable on Windows or simply go the putty install folder (e.g C:\Program Files\Putty).
  4. plink -t zz000412@PRODDOCS-VORA -m
psexec is another command to run from windows to call a script on another windows box.

Mediawiki + Bugzilla + SVN + SCMBug + Tweaks = Software Manager's recipe

It was fun trying to integrate SVN, Bugzilla and Mediawiki using SCMBug and BugzillaReports. The integrated system is really an efficiency booster and considering how easy it was to set up the value/effort ratio was well worth it. I am listing the steps needed to set this system up on Windows here which makes things very interesting sometimes. Linux install is similar and simpler.
  1. The first step was installing Apache, PHP and Active Perl on Windows. This is straightforward and well documented.
  2. Install MySQL
  3. Install Bugzilla. This is straightforward as well. Bugzilla uses Perl.
  4. Install Mediawiki.
    1. Turn off caching in Mediawiki. With caching on, you get stale data on bugs which can lead you to make wrong decisions.
  5. Install the Mediawiki - BugzillaReports Addon. This gives the ability to write short scripts in mediawiki which query bugzilla and present data on a web page as a reports. This itself takes you from zero to fifty.
  6. Set up backup scripts for MySQL.
  7. Install SVN
    1. Collabnet worked out pretty well.
    2. Set up Backup scripts for SVN
  8. Create custom fields in Bugzilla for recording code change list
  9. Install SCMBug
  10. Customize code in SCMBug. This will help:
    1. Format the regular expression for parsing out the bug ID from the comments.
    2. Change code to post changes to custom field instead of comments. SCMBug by default posts changes to Bugzilla comments which can be very annoying to users.