HOWTO

HOW TO : Recover deleted SSL certs from IIS

Here’s the situation.. you installed SSL cert on a website in IIS. You think you don’t need that site anymore and delete the site from IIS. The moment you delete it, you bite your tounge and remember that you are supposed to back up the SSL cert for future purposes.. But since the site has been deleted from IIS, you cannot export the key from the IIS manager!!.

Thx to Microsoft’s oversight (or potentially by design), you can still recover the certificate from the server.. Here’s how

  1. Open a MMC console by typing “mmc” in the Start –> Run prompt
  2. In the MMC console, click on File -> Add/Remove Snap-in
  3. In the “Add/Remove Snap-in” window, click on Add
  4. Choose the “certificate” snap-on and click on Add.
  5. Choose Computer Account in the certificate snap-on window and click on Next.
  6. Choose “Local Computer” (Note : If you want to recover from a remote computer, you can put in the UNC path. But you need to have admin rights on that machine) and click on Finish.
  7. Click on close and go back to the MMC console
  8. You will see all the certificates installed on the server
  9. Expand the “personal certificates” folder and you will see the SSL certificate from the website you deleted from IIS. Follow standard steps to export the certificate.

HOW TO : Sync files using FTP

If you ever run into a situation, where you need to sync two different directories and need to do that in a batch mode, try using FTPSync.

FTPSync is a freeware tool written by Kristof Gajsek. The tool has a bunch of options, like being able to operate in GUI and batch mode. Also good automated sync capabilities.

Only limitation is that it is windows based.

HOWTO : Use find and grep together

If you ever wanted to search for a particular text in certain types of files in Linux, you can use the following combo of find and grep

find / -name \*.xml -type f | xargs grep -i “text_to_search”

I used *.xml (note the \ before *) as the mask in the filename to look for all XML files.. then I piped this to grep using xargs.

A colleague pointed out that I can do the same by using

grep -r o-i “text_to_speech”

HOW TO : Clear saved username/passwords in Windows

I came to know this method, when I saw one of the IT techs use it to troubleshoot some Internet connectivity issues.

To clear any saved username/passwords (i.e. Internet Explorer, Windows Explorer etc) in Microsoft Windows, do the following

  • Click Start –> Run, and type in control keymgr.dll
  • Delete any entries you want to from the list
  • Click on close

I tried this on Windows XP and Vista.

HOW TO : Configure JBoss to follow symbolic links

Jboss, in addition to being an application server also serves static content. We recently ran into an issue where some static content was not displayed when users hit the link. The JBoss server kept spewing 404 errors, stating that the content was not found. On some hair pulling research, we figured out that JBoss, like Apache, does not follow/allow content mapped to a symbolic link.

So for example in your web app, you added a sym link to another directory, where most of your content is stored, Jboss would not show the content, when you go to the link.

Here’s a quick guide to fix this.

  1. Go to the deploy folder of the context you want to configure. For example, if you used the default context, you go to $JBOSS_HOME/server/default/deploy/jboss-web.deployer
  2. Edit the context.xml file and add allowLinking=”true” in the Context (NOTE : This allows Jboss to publish symbolic links on all apps in your application server, if you want to restrict it to just one particular app, you have to edit the context.xml in your specific application folder). Upon adding the option, our context.xml file looked as such



   

   
   org.jboss.web.tomcat.security.RunAsListener

More information on options for the context.xml can be found here

http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/2.1.0/config/context.html

For the record, Jboss configuration and accompanying documentation is what I call black magic :).. Too many options, too many ways to do the same thing.

HOW TO : Disable annoying message in e-mail by AVG anti-virus

If you are using the free version of AVG Anti-virus by AVG Technologies (Formerly GRISoft), you might have noticed an annoying message that the software inserts in all the e-mails it checks.. The message looks like this

No virus found in this incoming message.

Checked by AVG – http://www.avg.com

Version: 8.0.138 / Virus Database: 270.5.4/1567 – Release Date: 7/22/2008 4:05 PM

I really appreciate the free service that AVG provides for home users, but I don’t want to be reminded or advertise to the world regd the anti-virus I use in every e-mail.

You can disable this message by doing the following in AVG 8.0

  • Open the AVG control panel
  • Click on Tools -> Advanced Settings in the file menu
  • Highlight the “E-mail Scanner” selection in the left hand pane and uncheck the “Certify e-mail” option for both the incoming and outgoing e-mail. Here’s a screen shot.

Tracking my runs using Google charts

I wrote a brief blurb, when Google came out with their Google Charts API. The API essentially allows you to represent your data visually by just generating a URL.. I have been wanting to use this in real life for quite some time now and think I finally found a need :). I am going to be tracking my weekly runs with using this API  moving forward.

Here’s a graphical representation of my runs for Week 5 of my traning for the Chicago marathon

Week 5

As you can see, I have been slacking off on my mid-week runs.

I used the following parameters to generate the graph

Type = cht (vertical bars)

Legend = chtt (Week 5 training)

Axis Values = chxl (Mon, Tue, Wed, Thur, Fri, Sat, Sun)

The URL I used to generate the image is http://chart.apis.google.com/chart?chtt=Week+5+Training&chts=FF0000,20&chdl=Miles&cht=bvs&chxt=x,y&chxl=0:|Mon|Tue|Wed|Thu|Fri|Sat|Sun|&chs=300×150&chd=t:0,0,3,0,0,0,10&chco=4d89f9,c6d9fd&chbh=20

I still need to figure out, how to show the values in the image and play with the ratio of the axis.

You can get all the information you need about this API by visiting this link http://code.google.com/apis/chart/

HOW TO : Select column in Notepad++

Notepad++, is a great open source editor similar to EditPlus and UltraEdit. One of the features that I really appreciated in EditPlus, was the capability to select a column of data. I checked if NotePad++ has a similar feature and found the following hotkey that can be used to do this..

“Alt + Left Mouse Click” puts you in Column Mode Select

For a complete list of hotkeys that can be used with Notepad++, check out this link

http://notepad-plus.sourceforge.net/uk/shortcuts.php