Friday 28 November 2008

get_iplayer.pl - a beaut of a perl script

I've recently been looking at a perl script called get_iplayer.pl

To give you some background, the BBC offers the iplayer service online. Normally it would involve downloading and installing a Windows client program, selecting the TV/radio programs you want to watch/listen to and then playing the programs with either the inbuilt media player or (horror of horrors) Windows Media Player.

Now, I don't use Windows so therefore this is a pain. Why should I be excluded simply because I use the operating system of my choice (Ubuntu 8.10)?

An enterprising individual called Phil Lewis has created a perl script which basically does all the groundwork for you. It has been an absolute godsend since it can run as a cron job, and remembers what you downloaded. The perl script mimics the Jesus phone (iPhone) by downloading the H.264 stream and saving it to your hard disk.

Ubuntu - blank screen on boot fixed

I'm very happy now that I've managed to fix this very irritating problem. I have an Acer laptop rigged up to an external LG 17" monitor and every time I 'normal' boot, I see the usual Ubuntu logo and then just about when you would naturally expect to see the desktop - nothing. Nada.

I've been resorting to playing around in recovery mode, using xfix, removing all xorg.conf type files and rebuilding/rebooting numerous times to no avail. lspci revealed the ATI Express Radeon 200 adapter so that wasn't the fault.

I traced it back to the compiz app that was installed. I simply removed it with the following:

sudo aptitude remove compiz compiz-core

Now my desktop greets me every time I login, what bliss. Compiz should certainly be your first port of call if you have blank screen problems like I did.

JG

Thursday 27 November 2008

Octal permissions from a shell

I recently had the chance to resurrect a script from my HP-UX days which listed not only the usual human-readable drwx type permissions, but the octal permissions as well. Very useful when you're trying to teach someone about UNIX file permissions.

Here's a simple one liner that could be set as an alias or incorporated in a script. Personally I have mine created as a script called lsj, as shown below:


ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf("%0o ",k);print}'

An absolute gem to be honest and very useful. Works fine on Ubuntu (Intrepid Ibex - korn shell).

Looking to get it working so it will display all 4 octal values i.e. SETUID and SETGID, plus the sticky bit. More later.

PS3 dead - again

What else needs to be said.

The PS3 shut down a couple of times yesterday in a spurious fashion, before finally giving up the ghost once and for all. It's what is termed affectionately as the yellow light of death. There seems to be quite a few videos on YouTube with the exact same behaviour so I'm not alone.

Turn power on, red light.

Press power button, fans whoosh, green light, yellow light, red light - 3 short beeps.

There's good news and bad news. The good news is that after a call to Sony in the UK, they are prepared to replace my 60Gb PS3 with another one, even though the unit is out of warranty.I bought the PS3 in April 2007 so this is one hell of a goodwill gesture on Sony's part!

I've been the proud owner of the original Playstation, a slimline PS2 and the first PSP. So I must admit, it has troubled me that the PS3 has been this unreliable.

The bad news is I face a wait of a couple of months. The reason being, Customs here tend to view items like this as items you have to pay import duty on - as if you are bringing the unit into the country to sell, and deprive the government of funds. Not so in my case, and last time I left the country, I had to obtain a special letter from the Customs people (Aduana) to enable me to take the PS3 back to Britain and return without it being impounded.

I may send the unit back to my parents via DHL/FedEx, and Sony UK will then arrange for a courier to pickup/replace my beloved PS3. I'll probably have to wait until friends come over from the UK in January before I see the PS3 again :-(

Tuesday 18 November 2008

Bread

I must be at that stage of life where people buy useful rather than exciting presents for my birthday.

That was certainly the case when I unwrapped a huge box the other day, only to discover it was in fact a bread making machine. It was left on the side for a few days before I summoned up the enthusiasm to go and buy some fresh yeast, or levadura as they call it over here.

Three hours later, and I was in possession of a spectacular loaf of bread. Simply one of the best kitchen appliances money can buy. Apart from a dishwasher, of course.

A film to watch

I was hoofing through the channels the other night on TV and came across Elizabethtown, which was a film starring Orlando Bloom and Kirsten Dunst. I've seen a few photos of Orlando Bloom and saw qualities that reminded me of my brother Mark.

Well, watching the film was a revelation. There are several spots in the film where he just looks SO much like Mark. It's uncanny.

Friday 14 November 2008

More interviews and a birthday

Yes, I was 41 on Monday. And of all things best not to do on your birthday, I had two interviews lined up!

The first was with some foreign exchange trading company, based in the exotic location of Montevideo's very own World Trade Center [sic] complete with two mini twin towers. I kid you not...

The first interview was a complete pigs ear due to the fact that they hadn't done their homework. I arrived in good time (in other words, I was early) and proceeded to sit around for 10 minutes in a holding room where Bloomberg TV was blaring out. It was my first real taste of money and I had a good feeling about the office environment. My hopes were dashed after another 10 minute wait in the boardroom when 2 power-dressed women walked in and started babbling away in their native Spanish. With my best puppy dog eyes and a blurted phrase 'Can we speak in English please?', I then discovered that the position was for Spanish and English - although I had pointed out that I only spoke English when I applied for the post. A complete and utter waste of time, and not very professional on their part. I left the office smiling and walked out into the sunshine to meet up with Ale.

The second interview was just across the road for a much smaller company that provided server solutions (goodness - I hate that phrase). The position was for a Solaris (UNIX) administrator to oversee the installation of IT equipment for a client. It all went very well so fingers crossed. Bearing in mind the wheels of industry tend to turn at a slower rate than walking pace here, I will have to wait and see.

Birthday boy had some friends round that evening. One of my prezzies of all things was a breadmaker. Superb! I've always hated the rubbish they produce here that turns to dust when you whack it in the toaster. So I'm going to start experimenting and see if it can make something resembling a 'split-tin' ;-)

That's it for now - off to play with my Puppy Lighthouse linux install on my laptop.

Tuesday 4 November 2008

Weekend away in Colonia del Sacramento


We went to Colonia at the weekend. Ale had booked it up about a month ago, and I knew she was looking forward to it as much as me.

Colonia is an old town, with lots of picturesque old buildings and homes. Most of the side streets are cobbled, some more so than others. And when I say some more so than others, the most striking examples have some real ankle-killer stones laid out in a haphazard fashion. I think these streets must be at least 200 years old and Colonia has some real history with evidence of both the Portuguese and Spanish in abundance.

Driving into Colonia is pleasant on the eye, with the last 10km of road lined by massive old palm trees. Life is lived at a slow pace, and the speed limits drop progressively on arrival. You simply cannot drive any faster than 15-20 km/h or all your fillings will come out. This is is no way criticism of the place, it's what makes it what it is!

When you are there, you have a feeling of security and peace. No more car alarms or barking dogs that grind you down when in Montevideo. We walked the streets on a guided tour, and spent some time just exploring. We also went up inside a lighthouse, but I think that Ale is regretting that right now. The 120 steps it took to reach the top have come back to haunt her and her legs hurt. Thankfully, I'm not afflicted in the same way, hopefully because of my old cycling legs ;-)


We stayed at a beautiful 'lounge' hotel right in the centre of the old town. It was an excellent place to stay and thoroughly recommended. Take a look at their website here

Saturday 1 November 2008

Uruguay makes an entrance on the BBC website!

I've told many friends about the good old Fray Bentos canned meat pies we used to have in the 70's, and most didn't know that Fray Bentos is indeed a town in a Uruguay.

http://www.bbc.co.uk/blogs/magazinemonitor/10_things/

and more specifically here:

Fray Bentos - a town in Uruguay

See? I told you so....