s5h.net

“fresh linux news and advice.”


puce2008-03-29 Back in England

The Czech spring 2008 tour has finished and the photos are on flickr with some videos on youtube.

It's been a very nice trip with lots of scenery. Czech people are very hospitable and welcoming. The cost of beer in Czech is really low, in fact, most things from pubs are cheap except where near very popular tourist attractions, such as Prague castle where prices are close to that in the UK. One pint of beer is around 15ck, which works out to about 50p.

It is always good to know at least how to order beer in Czech: "Pivo prosim" is probably going to get you a beer, or at least some kind of service from the pub, "dveh pivo prosim" should get you two pints.

puce2008-03-21 mobile pages

A new mobile alternative for the linux news section has been produced. This should make getting linux news on your mobile much easier. You can get this by going to http://s5h.net/mln with your mobile.

I'm having a deliberate communication blackout now, no email, no messages etc as I'm off on holiday going to Czech with Misha, see ya later!

puce2008-03-20 oo development release

Might not be use to many people but there's a reasonably stable development release of OpenOffice.org (OOo) available on the mirrors. If you're interested in seeing a free office package for your system take a look at the site http://www.mirrorservice.org/sites/ny1.mirror.openoffice.org/developer/DEV300_m3/. Simply select win32 if you're using Windows, or you UNIX variant otherwise.

What I found really nice about this is that it doesn't collide with your existing OOo configurations and the two versions can run side-by-side without any issues about file incompatibility (as far as I can see).

On a different note, the sitemap pages here should finally be in order now. It's taken a long time to get a system setup that can walk over the 26,000 pages or so that make up this site in a relatively quick time - but it's finally done now!

puce2008-03-17 just to be on the safe side

For the past few months this page has been generating the sitemaps for a great length of time, although not writing them to disk, since that would fill the write buffers (not a huge issue) but would compare the MD5 sums against a database table's stored sums (post write).

So some simple snippet was desired to only produce the last two whole weeks, plus the current partial week of site maps. This was easy enough to do, as the sitemap index (that google crawls) holds references to the weekly maps (which contain the linux news pages).

sub get_last_two_cal_weeks {
	my $self = shift;
	my $t = shift;
	my @lt = localtime( $t );
	my @daylist = qw( mon tue wed thu fri sat sun );
	
	# this block takes the week  back to the start of the calendar week
	# now we can select just the last two weeks and then group by week
	# thus we do not need to rebuild such a large section of 
	# the sitemap on each iteration
	my $day = $daylist[$lt[6]];

	for( my $i = 0 ; $i<7 ; $i++ ) {
		if( $day eq $daylist[$i] ) {
			#print( "Matched $day with ", $self->{config}->{days}[$i], "\n" );
			$t -= 86400 * $i;
			last;
		}
	}

	$t -= ( 86400 * 14 );

	# the return value is not the rollover of the hour, it's just minus
	# the right number of days. the select statement should fill these
	# paramters with zeros
	return( $t );
}

puce2008-03-16 connection details

For the benefit of others the connection setup that I'm using on my phone is detailed here, it's important that we can share this information nokia 6500c if I should ever recommend this for someone else.

The 3G connection in this area seems to just come and go at will. It's not such an issue as at the moment the wired broadband (downstream) is working just fine, the upstream is close to GPRS speed though.

It is really good to be able to browse the internet from/via a phone, that is really important for anyone who works in networking and does a lot of commuting. It's just a shame that the speed isn't opened up fully, but it's not a big issue.

puce2008-03-16 on the move

As I'm not a user of a mobile device, I think it's about time I start making my own pages useful for people with tiny browsers. This gives a good overview for making mobile friendly pages.

puce2008-03-14 phone

Finally the SIM card for the Nokia 6500 classic has arrived, exactly a week after I ordered the phone and the simplisity + unlimited web bolt on. It seems to me that whoever put the order for the phone and tariff into the o2 system fscked it up.

After complaining about this and getting the right sim card ordered over the phone (using my virgin mobile) I then get a text message telling me that as of 12:48am I have 0.28GBP left in my top up account. Whoever wrote that automation at the virgin towers messed up also, 12:48am is a non-existent time. If it's truly in the morning then it is 00:48 (am). If it's afternoon then it's 12:48 (pm) since noon is 12:00.

What really annoys me is that the phone operator was not willing to convert my pay-as-you-go SIM to the correct tariff but instead I have to await delivery of their deciding.

Now that the phone is here, and the blue tooth is setup and working I can see what sort of throughput the phone has to offer, so far I have seen speeds of around 15kbyte/sec. Not that encouraging, since I know that 3G is capable of at least 300kbyte/sec.

There is also something very strange about this connection, it appears that the provider is removing chunks of javascript from HTML pages.

puce2008-03-14 telehouse

Reading the news on The Register it looks like plans are going ahead for a new data center in London named Telehouse South. This should be good news for anyone who is in the networking or sysadmin role as much work will be required for some data center migrations.

puce2008-03-13 worst of both worlds

Got to the station really early to not be held up at the level crossing where I got on the 0719 promptly to Reading. The train, on it's route was held up, meaning that it's earlier connecting train had left the station before we arrived. This then means that I have to idle away some hours before getting the 0814 to Paddington which calls at Maidenhead.

If trains could just run on time things would be ok. I wonder how much worse things will get in the Autumn when the leaves are on the line also.

puce2008-03-11 barriers

Barriers were up when I crossed the line, however this logic is now questionable. If getting the intercity and departing at Reading then there is little time to do work, which makes getting the train at all questionable logic.

Congestion in the Reading area causes trains to delay before arrival at Reading.

puce2008-03-10 More on trains

When approaching the Thatcham station I was one of first few in line for the crossing but the barriers still beat me to the crossing and had to wait and wait for the eventual arrival of the giant intercity which is still not content in occupying just the platform but has to occupy the crossing also.

Eventually the barriers lifted and allowed us access to the car park. Although it was not long before the barriers dropped again. Whilst in the station office buying a weekly ticket from perhaps Thames Trains' slowest ticket machine operator to issue a ticket, but fumbled he did as my preferred train came and went. The advice from another member of Thames Trains prestige staff was to simply wait for the next train. This was not satisfactory for me as the following train would not be possible to connect me to a Maidenhead train in time for my 0900-1730 office hours.

So I asked for a refund and want on my way in my car to J8/9 (the Maidenhead turn off), through standstill traffic and still got to work in time for office hours. What service do the train companies hope to offer when they cannot arrange for a train that is suitable size for a platform and cannot allow reasonable delay for people to park cars. I am nearly 100% certain that there are at least 10% of stations that overflow car parks that rely on barrier crossings. Why is it impossible for them to organise a train departure at a station?

This is such a disruption in my day, I am now spending on average more time in front of a computer yet I am logging fewer developments here.

puce2008-03-07 Still on trains

Barriers were not a problem at 0720, however the 0719 to Paddington was seriously delayed but thankfully, departing at 0736 an was able to arrive at Reading for the connecting stopping service to Paddington.

It will be a surprising week when there are no problems.

The return trip was probably going to be ok, except for the fact that the train to Oxford was delayed (as per usual) meaning that the much less condensed train to Reading was going to be late (and so risk missing my departure from Reading to Thatcham).

puce2008-03-06 trains

The barriers for the Thatcham over flow car park were once again lowered by the time that I reached them, this was to allow an intercity train through, again, far too large for the platform while it's rear carriages blocked the path of traffic at the crossing (why not park the trian with the carriages that are too large for the platform at the other end, thus allowing traffic to move?).

Once the train departed there were two other rail vehicles that needed to pass the Thatcham station, this delayed my crossing of the line and the departure of the 0732 stopping service to Reading.

Thankfully the stopping service to Paddington that departs from Reading at 0812 had not left, there were some maybe 5 minutes for me to make my way from platform 1 to platform 8. On this journey I noticed a flaw in the announcement system, it is not possible to hear announcements when using the walk way that runs through the middle of Reading station under the platforms. There was an important announcement that I missed; it was not related to the train that I had to catch, but it *could* have been.

I now have a bluetooth device to play with. It seems to me that most people on the train have a bluetooth phone of some sorts and bluetooth enabled - but access is sensibly disabled; it's still amusing to scan the devices and see how they're named.

Ok. Phone is ordered, contract is decided, should be getting some connectivity on the commute now. That means that I can find out what's going on when I'm waiting for a delayed train. Yes you read that *right* I can get news about why the train is late, while I wait for it.

puce2008-03-03 crypto

Tonight's update is nothing special, it's just something I was playing with on the train. My current work requires manual insertion of password entries in their crypted form. For this I've decided to make myself a short program to generate the password from standard input, this allows me to turn a known password into it's crypted form also.

The parameters for crypt are either a two character salt field, or 8 characters for MD5 crypt output, which is in the format of $1$NNNNNNNN.

The output of the crypt function contains the salt characters, in order to test a password, the salt has to be reprocessed and compared with the password crypt. For primitive crypt, the password field will look like this:

feTv7lyFcbToU

Where the first two characters (fw) are the salt and the remaining string is the crypt. For MD5 this looks like:

$1$fek8ToN0$KS5kvPO76x7p6jVzVAl.o/

Where $1$fek8ToN0$ is the MD5 salt ($1$ and the terminating $ are format characters).

If you wish to make your own crypt passwords I have included the script below.

#!/usr/bin/perl

use strict;
use warnings;

my $salt_chars = "";

sub make_passwd {
	my $plain = shift;
	my $salt;

	# generate some random salt
	for( 1..8 ) {
		my $r = int(rand() * 64 );
		$salt .= substr( $salt_chars, $r, 1 ); #".";
	}

	# here we call crypt twice, once with a MD5 salt, and once with
	# crypt, primitive salt, and write the outout to screen
	print( "MD5\t", crypt( "$plain", "\$1\$$salt" ), "\t", 
	"crypt\t", crypt( "$plain", substr( $salt, 0, 2 ) ), "\n" );
}

# this is the main routine, here we just set the salt_chars 
# with a..z, A..Z and two special characters . and /
sub main {

	for( 0 .. 25 ) {
		$salt_chars .= chr( 65 + $_ );
		$salt_chars .= chr( 97 + $_ );
	}

	for( 0 .. 9 ) {
		$salt_chars .= chr( 48 + $_ );
	}

	$salt_chars .= "./";

	srand;

	# while there is standard input to be read, call make_passwd
	# with the input
	while( <STDIN> ) {
		chomp;

		make_passwd( $_ );
	}
}

main();

puce2008-03-02 new month

During Saturday night I bumped into some old friends at the club, it's interesting to try and have a catchup whilst intoxicated, but it was good.

There's nothing to produce at the moment as far as programming goes but here is a link to an interesting challenge to hack your router. With home routers at less than 10gbp, people should be careful to the brand which they buy, otherwise they might be potentially putting their computers and private data at risk.