18 April 2006

ssh tunneling over http

Based on Tunneling SSH over HTTP(S)

Setup ssh tunneling over http with /etc/httpd/conf.d/ssh.conf
ServerName ssh.parwy.net:80
DocumentRoot "/var/www/html"

HostnameLookups On
ProxyRequests on
ProxyVia on

Order allow,deny
Allow from all
And ~/.ssh/config (no intermediate proxy)
Host *.parwy.net
DynamicForward 1080
ProxyCommand /cygdrive/c/sekhonp/tools/proxytunnel/proxytunnel.exe -p ssh.parwy.net:80 -d %h:%p
ServerAliveInterval 30
or ~/.ssh/config (intermediate proxy)
Host *.parwy.net
DynamicForward 1080
ProxyCommand /cygdrive/c/sekhonp/tools/proxytunnel/proxytunnel.exe -p proxyhost:proxyport -u proxyuser -s proxypassword -r ssh.parwy.net:80 -d %h:%p
ServerAliveInterval 30

16 April 2006

A tourist's agenda for London

http://www.londonpass.com/ can be cheaper for intensive visits
http://www.visitlondon.com/city_guide/attractions/f_london_pass.html lists of sites covered

Tower Bridge Exhibition
Duration: 1 hr 30 mins
Address: Tower Bridge London SE1 2UP
Tube: Tower Hill
Tel: 020 7403 3761
Email: enquiries@towerbridge.org.uk
Web: www.towerbridge.org.uk
Opening Times:
Oct-Mar: 0930-1700,
Apri-Sep: 1000-1730
Closed: 24-25 Dec.
Prices: Adult: £5.50, Child: £3.00, Concession: £4.25

Food and drink at The Dicken's Inn St. Katherine's Docks.

Tower of London
Duration: 2 hours
Address: Tower Hill London, EC3N 4AB
Tube: Tower Hill
Tel: 0870 756 6060
Email: nicoleshields@hrp.org.uk
Web: www.tower-of-london.org.uk
Opening Times:
Mar-Oct: Sun-Mon 1000-1700, Tue-Sat 0900-1700.
Nov-Feb: Sun-Mon 1000-1600, Tue-Sat 1000-1600
Closed: 24-26 Dec and 1 Jan.
Prices: Adult: £14.50, Child: £9.50, Concession: £11.00

St Paul's Cathedral
Duration: 1 hour
Address: St Paul's Churchyard London, EC4M 8AD
Tube: St Paul's
Tel: (020) 8340 9591
Email: chapterhouse@stpaulscathedral.org.uk
Web: www.stpauls.co.uk
Opening Times: Mon-Sat, 0830-1630,
Prices: Adult: £8.00, Concession: £7.00, Child: £3.50

London Eye
Duration: 30 minutes
Address: Riverside Building, County Hall Westminster Bridge Road London, SE1 7PB
Tube: Waterloo
Tel: 0870 5000 600
Web: www.ba-londoneye.com
Opening Times:
October-May: 1000-2000,
June-September: 1000-2100
Closed: Christmas Day
Prices: Adult: £13.00, Child: £6.50, Concession: £10.00

London Aquarium
Duration: 2 hours
Address: County Hall Riverside Building London, SE1 7PB
Tube: Waterloo
Tel: 020 7967 8000
Email: pressoffice@londonaquarium.co.uk
Web: www.londonaquarium.co.uk
Opening Times:
1000-1800 (last admission 1700)
Closed 25 Dec. Open times over the Christmas period may vary.
Prices: Adult: £9.75, Child: £6.25, Concession: £7.50

Big Ben

Houses of Parliament (Only summer tours)
Duration: 1 hour 30 mins
Address: Parliament Square, London, SW1A 0AA
Tube: Westminster
Tel: 0870 9063773
Opening Times: Summer opening to be confirmed, late Jul-early Oct
Prices: Adult: £7.00, Child: £5.00, Concession: £5.00

Westminster Abbey
Duration: 30 mins
Address: Parliament Square, London, SW1P 3PA
Tube: Westminster
Tel: 020 7222 5152
Email: info@westminster-abbey.org
Web: www.westminster-abbey.org
Opening Times:
Apr-Oct, Mon-Fri 0930-1545, Sat 0930-1345.
Closed Good Friday and Christmas Day.

Buckingham Palace (Only summer tours)
Duration: 1 hour, 30 minutes
Address: London, SW1A 1AA
Tube: Victoria, St James's Park, Green Park
Tel: 020 7766 7300
Email: bookinginfo@royalcollection.org.uk
Web: www.royalcollection.org.uk
Opening Times: 26 July-24 September 2006 0945-1800 (last admission 15.45). Timed tickets with admission every 15 minutes throughout the day.
Prices: Adult: £14.00, Child: £8.00, Concession: £12.50

Bateaux London Cruise
Classic Lunch 2 course: £19.50, 1200 Embankment or 1235 Waterloo Pier, Nov-Dec Wed-Sat, Jan-Mar Thu-Sat
Classic Dinner: £65, 19:45 Embankment, Nov-Dec Sun-Sat, Jan-Mar Tue-Sat

Covent Garden Market
Leicester Square
Comedy Store


British Museum
National Gallery
Natural History Museum
Science Museum
The Victoria And Albert Museum

Outer London
Thorpe Parke

Backup blogger

I'm backing up this blog site with
wget --directory-prefix=/srv/blog --wait=7 --mirror --ignore-length --page-requisites --convert-links -e robots=off --span-hosts --domains=photos1.blogger.com,parwy.blogspot.com http://parwy.blogspot.com/
some notes:

saves all files to /srv/blog
--mirror: causes it to recurse to any depth and check timestamps to only download newer files
--ignore-length: blogger seems to report a different length for files which causes wget to download files that havent changed
-e robots=off: without this any phots at photos1.blogger.com are not downloaded, as this site has a robots file which prevents any crawling, since I'm only crawling over photos I link to, its okay to disable

Some typical java vm parameters

-agentpath:"C:\Program Files\YourKit Java Profiler 5.1.1\bin\win32\yjpagent"

Directions to 14 Rutlish Road

Directions from MultiMap

Directions from M25

  1. Get off M25 on Junction 10, onto A3 towards Central London

  2. Stay on A3 for about 15 minutes, until you see signs for the A298 towards Wimbledon/Merton Park. You will be going towards Merton Park.

  3. After 5-10 minutes, you will pass Wimbledon Chase station on your left, while going under a bridge, then a few minutes later, the Nelson Hospital on your right.

  4. After a further few minutes, you will go over some traffic lights which cross a tram line, on your right will be a large cream coloured pub called the White Hart. Turn right here onto Rutlish Road and down to the end of the street.

Roadmap of 14 Rutlish Road

15 April 2006

Backup del.icio.us

wget --http-user=delicious-user --http-passwd=delicious-pass -O bookmarks-delicious.xml http://del.icio.us/api/posts/all


Here is a modified version of the LDIF to VCARD script by Scott Barninger at http://www.barninger.com/ldif_to_vcard/.

Its adds a lot more fields, its adds some escaping of special characters:
$VERSION = "0.2.0";
use Net::LDAP::LDIF;

# declarations

$ldif = Net::LDAP::LDIF->new(\*STDIN);

while($entry = $ldif->read()) {
$common_name = &escape($entry->get_value('cn'));
$first_name = &escape($entry->get_value('givenName'));
$last_name = &escape($entry->get_value('sn'));
$org_name = &escape($entry->get_value('o'));

$email = &escape($entry->get_value('mail'));
$url = &escape($entry->get_value('url'));

$homephone = &escape($entry->get_value('homePhone'));
$workphone = &escape($entry->get_value('telephoneNumber'));
$mobilephone = &escape($entry->get_value('mobile'));
$fax = &escape($entry->get_value('facsimileTelephoneNumber'));

$address = $entry->get_value('postalAddress');
$address =~ s/\\/\\\\/g;
$address =~ s/;/\\;/g;
$address =~ s/\r\n|\n|\r/\\, /g;
$city = &escape($entry->get_value('l'));
$state = &escape($entry->get_value('st'));
$postcode = &escape($entry->get_value('postalCode'));
$country = &escape($entry->get_value('c'));

$categories = $entry->get_value('categories');
# ldap contains semi-colon seperated list, vcard requires comma seperated list
$categories =~ s/,/\\,/g;
$categories =~ s/;/,/g;

$note = $entry->get_value('description');
$note =~ s/\\/\\\\/g;
$note =~ s/\r\n|\n|\r/\\n/g;

($sysdate,$systime) = &sys_date;

# only output relevant records, should really check objectclass
# if($homephone || $workphone || $mobilephone) {
print "BEGIN:VCARD\r\n";
print "VERSION:3.0\r\n";

print "FN:$common_name\r\n";
if($first_name || $last_name){
print "N:$last_name;$first_name\r\n";
# print "N:;$common_name\r\n";
print "ORG:$org_name\r\n";

print "EMAIL;TYPE=INTERNET,PREF:$email\r\n";

print "URL;TYPE=WORK:$url\r\n";
} else {
print "URL;TYPE=HOME:$url\r\n";


print "TEL;TYPE=WORK:$workphone\r\n";
print "TEL;TYPE=HOME:$homephone\r\n";
print "TEL;TYPE=CELL:$mobilephone\r\n";
print "TEL;TYPE=FAX:$fax\r\n";

if($address || $city || $state || $postcode || $country){
print "ADR;TYPE=WORK:;;$address;$city;$state;$postcode;$country\r\n";
} else {
print "ADR;TYPE=HOME:;;$address;$city;$state;$postcode;$country\r\n";

print "CATEGORIES:$categories\r\n";

print "NOTE:$note\r\n";

print "REV:$sysdate" . "T$systime\r\n";

print "END:VCARD\r\n";
# }


sub escape {
local($a) = ($_[0]);
$a =~ s/\\/\\\\/g;
$a =~ s/;/\\;/g;
$a =~ s/,/\\,/g;
return $a

sub sys_date {
# get the system date
# usage: my($sysdate,$systime) = &sys_date;

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
if (length ($min) == 1) {$min = '0'.$min;}
if (length ($sec) == 1) {$sec = '0'.$sec;}
# since localtime returns the month as 0-11
$mon = $mon + 1;
if (length ($mon) == 1) {$mon = '0'.$mon;}
if (length ($mday) == 1) {$mday = '0'.$mday;}
# since localtime returns the year as the number of years since 1900
# ie year is 100 in the year 2000 (so is y2k OK)
$year = $year + 1900;
my $date = "$year-$mon-$mday";
my $time = "$hour:$min:$sec";

14 April 2006

Hello World

The title says it all, lets see if I ever get to post another entry again!