DOMDocument, DOMXPath and invalid html

I've been doing some work with DOMDocument and DOMXPath to parse webpages recently, and even though I could get the XPath directly from Firefox or Chrome, it would not match in the $xpath->query(); What I found is that the $dom->LoadHTML($page); will handle invalid HTML, but mostly just by stripping it out. This is fine, unless you depend on the structure for the XPath query. The problem was the the page contained tables (we've all built them, missing the TBODY tags).

Ubuntu winbind not working?

Have you been trying to get winbind working on Ubuntu, and not having any luck? After the usual:

 

sudo apt-get install winbind

 

You also need to install libnss-winbind as well:

 

sudo apt-get install libnss-winbind

 

That should get it working, when combined with the change of the hosts: line in /etc/nsswitch.conf from:

 

hosts: files dns

 

to

 

hosts: files dns wins

 

And presto, it should start working.

Fathers day

My two fantastic daughters Jess and Cass bought me this awesome Star Wars onesie for Fathers day. Unfortunately my lightsabre did not come when I used The Force to call it, so is not in the picture.

Fish smoker

One of the Christmas presents I got this year was a Jarvis Walker Fish Smoker. I've been a bit slack, but we bought some Trout today to give it a try. It worked quite well, but I think I left it in a little too long, so taste is not awesome. I'm sure it will take a few more tries to get the technique down pat, but I'm looking forward to trying a few different combinations.

Outlook fail

Microsoft outlook has a facility to "recall a message". However, despite what you may think it would do, all it does is send a message to all recipients stating that you'd like to recall the message. Basically, outlook has a "I was a dumbass" function. It just tells everyone that you sent the message to that you DON'T want them to read the message you just sent. WTF. So full of fail, only makes you go to read it more!

Silverlight and .net

Just doing some test work on a Windows 2008 server and (re-)discovering how awesome Microsoft isn't. Try to watch video on their site, can't I need Silverlight. Is that available for Ubuntu? Not likely.. Ignore that and go to download/install mysql for windows, need to install .net 4.0 for the mysql server. Its hard work doing work in windows land. I so miss being able to 'apt-get install apache2 php5 mysql-server'.

Michelin tubeless mountain bike tires on the beast.

Finally got the tubeless tires on the mountain bike and took it for a spin this morning. Its only taken about 3 months for me to get around to it, sigh. Can already see one spot where the puncture juice has self healed, awesome. Now to start riding a bit further every day, to get my fitness back up. I put on 2.1 profile tyres, and the are quite a bit larger than what was on before, and I think the ride is a little smoother because of that.