Friday, August 6, 2010

handy java property to dump http traffic.

I find myself needing this command and unable to remember it or find it on Google easily. So I'm going to make a note of it here to save my precious memory for other more important information:

-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true

Right, now I can try and remember where I live...

Tuesday, August 3, 2010

svn Id keyword in Perl

My Perl program wants to report it's SVN Id keyword. Setting this up is simple enough if you follow one of the many excellent examples on the web. However I found that it was beyond me to get the value of my Id printed out by my code.
The problem is that the completed SVN Id keyword contains @ and $ symbols.

So my code resorts to greping it's self to get the value from the source code.

# $Id$
my $id_str = `grep -m1 '\$Id:' $0`;
print $id_str;


It feels like a crime against programming, but it works - and provided that there is an $Id$ before the grep command, it should work reliabably.