July 2004 Archives
Had to reinstall SUSE 9.1 at home today. Just so that I don't spend 457 hours chasing down crap here's a note for future reference: Vanilla SUSE 9.1 doesn't like your NVIDIA video card.
So that I don't forget:
1. Find the NVIDIA driver CD (contains NVIDIA-Linux-x86-1.0-5336-pkg1.run).
2. Make sure you install the kernel source.
3. Ensure you boot at runlevel 3 instead of runlevel 5 (X will crash if you choose 5).
4. After installation, switch user to root, cd to /usr/src/linux.
5. The .config file will not exist so make one: zcat /proc/config.gz > .config
6. Then make cloneconfig.
7. Now you are ready to install the NVIDIA driver sh NVIDIA-Linux-x86-1.0-5336-pkg1.run.
8. Then the final step is to configure XFree86: sax2 -m 0=nvidia (and that's a zero not a letter).
There, that should save me 2 hours of my life if I ever have to do this again in the future. And just for good measure I think I'd better print this out :-)
My new laptop has a built in wireless card. Just now I enabled it by accident and discovered that there are two (count em) wide open wireless networks in my area :-)
Scary that someone has set these up without securing them. Sucks to be them. Good to be me :-)
Ok, so it was a novelty the first time we saw the impossible martial arts moves in The Matrix and the crapfest that was Crouching Tiger Hidden Dragon. Oh and don't forget the mandatory slow motion action scenes as well.
Can we get back to the proper fighting again? Please? When the 'fly-through-the-air' slow motion kicking bollocks has made it into a Charlies Angels movie you know that it's time to move on.
I suppose the bigger question here though is what the hell was I doing watching Charlies Angles: Full Throttle in the first place? Dunno really. It was like a train wreck and I couldn't look away. Got to be one of the worst movies I've *ever* seen :-)
You know there are Perl geeks and then there are scary Perl geeks. PLJava.
import perl5.Perl ;
import perl5.SV ;
public class test {
public static void main(String argv[]) {
Perl.eval("print qq`Hello World!\n` ;") ;
SV hash = Perl.eval_sv(" { a => 11 , b => 22 , c => 33 } ") ;
String k_a = hash.key("a") ; // 11
String k_b = hash.key("b") ; // 22
String k_c = hash.key("c") ; // 33
}
}
Ever seen a really, really old lady with road rage? I got a taste of that this morning driving to work.
One of the things I hate about freeways is when you have to get into another lane, there might be someone two lanes over trying to get into that lane also. I want to turn left into the middle lane, other driver wants to turn right into the middle lane. Get the picture? Ok, then I'll continue.
This morning I did my conscientious driver bit, i.e looked to make sure no cars were in the lane I wanted to get into, put on my indicator and started turning left into the middle lane. After I had started to move, a car two lanes over decides they would like to turn into the middle lane also. I saw the car out of the corner of my eye and quickly went back into my lane. There was never any chance that we would have hit each other as we had almost an entire lane separating us. "Phew, that was close" I thought to myself and just carried on driving.
Well this must have really pissed off the other driver for some reason because the car crossed over into my lane right behind me. I looked in my mirror and saw a 90 year old lady hunched over the steering wheel. She was shouting, waving her hands around, honking her horn, flashing her lights. She then started to slam her hands down on the steering wheel.
I can't remember the last time I laughed so hard. It was *so* funny to watch. She carried on like this for about 10 miles and even followed me up the off ramp. I had visions of her following me to work and beating me up with her handbag :-) Eventually she turned off down a side street and I never saw her again.
I'm still trying to work out exactly what she was pissed off about. You're supposed to be relieved when you avoid an accident.
Personally I love it when there's a storm. As we were going to bed last night we had some pretty decent lightning/thunder/rain. Sad kids that we are, we decided to get out of bed and go outside to watch the storm :-)
I'm lucky enough to have a cubicle with a window and have a nice little view of the street outside. This is really quite a nice arrangement really. Today I really wished that I was on the other side of the 'cubie farm' with no windows though.
About half an hour ago, 100 blokes arrived right outside my window all carrying big signs. 'Who the hell are these guys?' I wondered and thought nothing more of it. Then the shouting and whistling began. 100 blokes make quite a racket you know. Turns out they are union workers complaining about some of the, ahem, undocumented construction workers that are working on the floor above us. We share our building with many other businesses and I think the construction is happening in a doctor's office or something.
At first we all thought all the hoopla was quite entertaining. Then about 1 minute later we realized that it was actually pretty fucking annoying. They are still outside my window.
I wish they would bugger off.
Yesterday we decided to get in the car and go for a ride. Ended up doing a 300 mile round trip. Had lunch in Payson before spending some time in Pine and Strawberry. Nice break from palm trees and desert as the drive took us through quite a lot of forest.
The weather was a nice break too. Haven't seen rain like that in ages. Pretty good lightning as well. I swear some of it hit the road in front of us :-)
So I've got SUSE 9.1 installed. I partitioned the disk first with QtParted (very nice software BTW) and then proceeded with the Linux install. For all my worrying, it was all rather painless. SUSE 9.1 is very happy on this laptop and WinXP boots without any problems. BONUS.
The corporate desktop support group are a bunch of really nice blokes. Didn't even need to bribe them with beer :-) I have full access to the BIOS settings so I was able to have the laptop boot from CD. Excellent :-)
My old laptop ran Fedora Core 1 which had a 2.4.x kernel. The distro I want to install on this laptop has a 2.6 kernel. I've just finished reading some horror stories about 2.6 kernels performing destructive partition resizes causing WinXP to not boot. I'd think I'd rather avoid that as I'm sure the desktop support group would cease being friendly and might get the baseball bats out.
So, I'm reading the NTFS Resize Frequently Asked Questions before proceeding. I'll prolly end up using SystemRescueCD to resize the NTFS partition before I attempt a 2.6 kernel install.
I've installed two 2.6 kernel based distros so far. My desktop machine at work runs SUSE 9.1 and my home desktop runs Mandrake 10. Haven't been bitten by the partition fuckup fairy because my desktop at work only has Linux installed. My home desktop has two hard drives - WinXP on one and Linux on the other. This will be my first time installing a 2.6 kernel based distro on the same HD as WinXP. Little scared I must admit :-)
So today is the 'turn in your old laptop - get brand spanking new Dell laptop' day here at work. I'm going to get mine in a couple of hours. We've got some new desktop support folks that will be responsible for the laptops from now on. With the 'old regime' they had no problem with me installing Linux, they just made it quite clear that I would be on my own as far as support goes. Not sure if the news guys will be as accommodating.
Hopefully they don't have the BIOS password protected so I can set the system to boot from the CD/DVD. If they do have it password protected I'll try and bribe them with beer first and if that doesn't work I guess I'm stuck with a WinXP laptop. It'll be super fast, have loads of memory, huge hard drive but a crappy OS. Maybe it won't be so bad once I've got Firefox/Thunderbird/gVim/Perl installed. Time will tell. Either way, I'm *really* pleased to be getting rid of the dinosaur I'm using to type this blog entry - new laptops - yum :-)
How much does MS Outlook suck? Let me count the ways. That might actually be a rant for another day so I'll just pick on the suckage I discovered today. For a project we're working on, one of the requirements state that we must send out a HTML email report daily. I know, I know, HTML email is evil but whaddayagonnado?
I've used MIME::Lite for just about every single email task I've ever needed in Perl. Quite simply, it rocks.
There are a couple of different ways you can send HTML email with MIME::Lite, I chose this method:
$mailer->attach(
Type => 'text/html'.
Path => '/path-to/my/html-template'
);
The MIME::Lite docs state that if you don't specify a disposition parameter when calling the attach method, it defaults to inline. This is exactly what I wanted. So tested this out with Evolution, Thunderbird, Mozilla Mail and it looked fine. The HTML appeared in the body of the email and everyone was happy.
The new version of the code was released and the email report went out. I got a quite a few phone calls from users stating that their reports were showing up as attachments. WTF? Turns out they were all Outlook users. Outlook decided it knew best and turned the HTML into an attachment. Bugger.
So, just to please the Outlook users, the code was changed to this (and I really don't like having to slurp files but...).
open(TEMPLATE, $template) || die "Couldn't open $template - $!\n';
my $HTML = join "", <TEMPLATE>;
close(TEMPLATE);
$mailer->attach(
Type => 'text/html'.
Data => $HTML
);
This seems to keep Outlook happy.
VH1's 'I Love The 90s' might actually be the best thing on TV at the moment. We watched 1992 and 1993 last night and it rocked :-)
Because I can never seem to make my mind up, I'm back to using Bloglines as my RSS aggregator of choice. It seems that trying to keep syndigator in synch across multiple boxes was more trouble than it was worth.
I had all these grand ideas about hacking on syndigator and adding synching functionality but never actually got any further than manually tar'ing up my .syndigator directory and placing it on a FTP server. That got old quickly especially as I kept forgetting to do it before leaving work on Friday night. I'd kick myself on Saturday mornings because the tarball on the FTP server was *way* out of date. Suckage. Perhaps when I get a little more free time I can have another stab at it.
Anyway, it seems that Bloglines has had a bit of a makeover since I last used it, looks good. I like it.
Jay Allen has posted some screenshots of MT-Blacklist 2.0. VERY nice indeed.
So lets just recap. 881 Americans are dead because Dubya lied to the world about the need to go to war with Iraq. Why has this man not been impeached already? There were no weapons of mass destruction and there were no ties between Al Qaeda and Iraq. So what's left? Must be the Iraqi Army then...
WASHINGTON, July 10 — The Senate's report on prewar intelligence about Iraq, which asserts that warnings about its illicit weapons were largely unfounded and that its ties to Al Qaeda were tenuous, also undermines another justification for the war: that Saddam Hussein's military posed a threat to regional stability and American interests.... oh, I guess not :-)The committee's report implies that opponents of the war were essentially correct when they argued that Iraq posed little immediate threat to the United States. Before the war, those who held this view, both in Congress and at the United Nations, argued that continued containment was a course preferable to invading Iraq.
Via Ben Hammersly's software patent article. 'Hello World' in 204 different languages.
Everyone has seen the Hello World program used as a first exposure to a new language or environment. We are attempting to collect examples for as many languages and related programming environments (shells etc.) as possible.Personally I like the Brainf*ck example:
>+++++++++[<++++++++>-]<.>++++++[<+++++>-]<-.+++++++..++
+.
>>+++++++[<++++++>-]<++.------------.<++++++++.--------.
+++.------.--------.>+.>++++++++++.
I bought the new Beastie Boys album yesterday and I've been listening to it quite a lot today. I've been a sort of closet Beastie fan over the years. I've never actually bought any of their albums but I've liked most of the singles they've put out [1] so I thought I'd give their latest album a try. So far I think I quite like it. Rap is altogether NOT my cup of tea usually so listening to a whole album of it takes a little adjusting.
And changing gears, I also bought the new Cure album but haven't actually listened to it yet. Now unlike the Beasties, I own EVERYTHING by The Cure. Been a big fan ever since I heard "In Between Days" on the radio when I was but a wee little nipper. I'll prolly listen to it tonight, hopefully it's as good as "Bloodflowers".
[1] With the exception of the craptacular songs off their first album (Fight for your right et al).
No matter how many times I do it, I'm still completely crap at wrapping presents. I spent a good 2 hours wrapping my wife's birthday presents last night and what a performance that was.
It's not that wrapping is particularly difficult so I've no idea what the hell my problem is. I'm convinced that you're either born with the ability to wrap or you're not. Simple as that. Wrapping is obviously something you cannot learn :-)
Resize 100 images you say? Well if there were only 1 or 2 then I suppose I could fire up The GIMP and resize them manually. Of course I think I'd rather saw my own fingers off with a blunt knife than have to manually resize 100 images. So seeing as I like my fingers where they are, it's Image::Magick to the rescue.
#!/usr/bin/perl -w
use Image::Magick;
my $dir = shift;
opendir(DIR, $dir) || die $!, "\n";
if (! -d "$dir/resized") {
mkdir("$dir/resized") || die $!, "\n";
}
my @files = grep /\.jpg$/, readdir DIR;
for (@files) {
my $new = "resized/$_";
my $im = Image::Magick->new();
my $result;
$result = $im->Read($_) && die $result;
$result = $im->Scale(geometry => '130x130') && die $result;
$result = $im->Write($new) && die $result;
}
They say imitation is the sincerest form of flattery. There's another Puzzle Bobble clone on the block. Seems that the *awesome * Frozen Bubble wasn't enough. Ladish and chennelmen I give you Monkey Bubble.