Ricky Moorhouse

Blog

Linux: What is using up disk space?

du -m | sort -nr | head

du -m

summarises disk usage from current path recursively (in megabytes)

sort -nr sorts the output numerically in reverse

head restricts output to the top 10 lines

adapted from Linux Reviews

Customising Pocket Ubuntu for Windows

I've been playing about with Portable Ubuntu for Windows, as a replacement for my secondary machine at work, and customised the system a bit for my liking. This is going to be a working post for me to add notes on what I've changed so that I can find it again! Initially I was planning to build my own image based on Cooperative Linux, but decided that as Portable Ubuntu for Windows had most things configured it made a better starting point.

Moving the notification popups

The default notification position is bottom right, which was appearing below the windows task bar - so I wanted to move them

  • Open up gconf-editor

  • Go to apps, notification-daemon

  • Edit popup_location to suit your setup - I'm currently trying top_right

Sharing a printer from XP to Vista

After quite a while of not being able to print from our laptop to the shared printer on our XP desktop, I finally got it working last night thanks to my Dad.

Here's the instructions:

Make sure you can see the XP computer from Vista.

If you can't:

  • make sure the workgroup is the same (as the defaults are different)

    In Vista, go to Computer, System Properties

  • make sure file and print sharing is allowed through the firewall - in our case we had to reset the firewall rules on our XP machine and re-add the ones we wanted for this to work:

    • Go into Control Panel, Network and Internet Connections, Windows Firewall

    • On the Advanced tab, click Restore Defaults

    • On the Exceptions tab, make sure that File and Print Sharing is ticked

Adding the printer:

  • Go to Control Panel, Printers

  • Select "Add a printer" from the bar at the top

  • Select "Local Printer" (yes I know it's strange)

  • Select "Add a new port" and choose "Local port" from the list

  • Enter path to printer e.g. \computerprinter

(you can find the printer name from Printers in Windows XP - right click on the printer and choose sharing)

Strictly Come Dancing Live Tour

Last weekend we went up to the O2 arena for the Strictly Come Dancing Tour and we had a fantastic day. Getting up there went really smoothly - the roads were clear and the views of the snow on the surrounding countryside was amazing. We got up there at about 11 o'clock and thought that we'd beat the rush and head straight to Nando's for lunch - annoyingly they didn't open till 12 so we headed back to Starbucks for coffee and a snack to give us energy for the hour before we could eat! We then explored the 'Entertainment Avenue' and headed back to Nando's for lunch. We got in there first and were glad of that as we saw how big the queue was once we'd got our food.

After lunch we were originally thinking of going round the outside of the O2 to see the Thames and the other side of the building, but then we noticed that the O2 lounge was open and went to find out what it was. They let us in and we could then relax on comfortable chairs and sip cocktails until it was time to go into the arena.

As we'd been in the O2 lounge, When we headed into the arena we could just get the lift straight up from there instead of having to queue to get in at the main entrance.

The show itself was brilliant and the atmosphere was fantastic. It was great to see the dances that we'd seen on the television series live and there was a good balance of the familiar dances and new ones, with the different pairings that they had for the tour. I was also impressed with how they'd mapped the tv series into a live show so smoothly. There were 2 halves to the show with a 20 minute interval in between - the first half each couple did a ballroom dance, and the second half they each did a Latin dance. All the judges were there as well providing their comments and their scoring (although the winners were chosen just on the audience vote).

At the end of the first half, the lines opened to vote by text message for your favourite couple and at that point, I was undecided between Jodie and Ian's Foxtrot and Rachel and Vincent's Tango so I decided to wait until the second half to vote. In the interval we were able to go back down to the O2 Lounge, which was brilliant as it meant there was no waiting in queues, although it took us a while to get down there. In the second half, my favourite dance in the competition was Jill and Darrens' Jive - which was so much better live than on television and they pulled in their 40 points again from the judges.

After the competition, there was a group dance with everybody in starting off with giant feathery wings which looked amazing and they really filled the massive dance floor between them. Following that Kristina and Matthew did a fantastic show dance - it was amazing how fast they move and how well they went together.

Another baby on the way...

At last our 12 week scan arrived. It had felt like it was a really long way, but it seemed to come round quite quickly once Christmas had gone. So this evening we finally got to see our new little baby, and it was wonderful.

It had been a bit worrying initially as we couldn't find the heartbeat with the doppler we'd rented and the midwife couldn't find it either when she tried on Tuesday. But all the other noises were as expected.

It was really lovely to see our new little baby this evening - seemed to be quite laid back, but did roll round onto his side at one point. Still was quite different in movement to Abi, who was doing backflips at this point!

Too much CBeebies?

Today when I was in town with Abi, we saw a man sitting on a bench – she pointed at him and said,

"It's Grandad Tumble"

I said, "It's not Grandad Tumble"

She said, "It is Grandad Tumble isn't it! Okay!

Read to you

As I was reading with Abi before she went to bed tonight, she decided that she wanted to read:

**Abi: **Abi want to read to you

**Me: **Ok, let me find you the page...

**Abi: **Angel visited Mary ... you're having a baby!

**Abi: **What's the baby called?

**Me: **Jesus

**Abi: **Yes, thats right!

Wake up…

As Abi was going to bed, we had the following conversation:

**Abi:**Abi to wake up early

**Abi:**Abi wake up at 3

**Me:**Thats too early - how about 8?

**Abi:**Abi wake up at 10 to 7

On the floor for landing

For the first part of the flight back from Malta, we had fun with Abi as she enjoyed the flight and liked her mini seat just between us as we'd folded up the arm rest.

After we'd had the in-flight meal on the return journey, and after Abi had fallen asleep, my stomach started to feel a bit funny so I got up to stretch my legs and get some water. I got as far as the galley, started to ask for some water and that's the last thing I remember until the black haze cleared enough to see some blurry shapes that resembled the stewards around me.

Eventually I made out Des's voice talking to me. I was laying on the floor with my feet rested on a metal box. I was given some water and my head wiped with a cool wet cloth.

Gradually I started to feel better and decided that I wanted to sit up somewhere so I was lifted up onto one of the fold down chairs in the galley. I sat there for a bit and had some water, but then I started to feel cold and shivery. I remember Des saying "He's going again" and that I was looking pale and I was laid back down on the floor.

I was put on oxygen for the rest of the flight. This made me feel a lot better - pretty much back to normal, but I stayed lying down until the paramedics checked me out. Lying on the floor of the plane for the landing was very strange - I had to be held still from all angles, Des was holding my head, one of the stewards was holding my shoulders and another my feet. The force that was wanting to push me down the plane was incredibly strong - you don't realise this when sitting strapped into a seat, but on the floor it really felt like I would have gone flying right down the aisle.

When we arrived at Gatwick, paramedics from the airport fire service met us as soon as we'd taxied to the airport. They did some basic checks and everything seemed to be normal. Then the paramedics from the ambulance service arrived and did some more checks, which again seemed to be normal. They got me to get up slowly and took me down to the ambulance to do an ECG and check my blood sugar level, both of which came back fine.

The ambulance crew thought that it was because I have a slightly low blood pressure anyway and with various other factors - the plane being hot and stuffy; the pressurised environment; exhaustion and just having eaten it had been affected more. Apparently they get quite a lot of calls to hot restaurants when people have had similar incidents.

After leaving the ambulance, I was led back into the terminal through the airport by a fantastic BAA medical assistance guy, as I'd originally come down the stairs at the side of the link way to the plane. I was taken to where Laura, Des and Abi were waiting for me and then he ushered us all through the airport and got us through passport control without queuing and led us straight to where our baggage come out.

Chop and chomp in perl

Just a reminder, so I remember the difference! - chomp is a safer version of "chop" removes any trailing string that matches what perl thinks is a new line)

` $string = "abcdef";
chop($string) # $s is now f, $string is now abcde
chomp($string) # $string is still now abcde

$string = "abcdefn";
chomp($string) # $string is now abcdef
`