December 16, 2008

The voice of spam

Got an Apple Mac and some spam email? Why not make your Mac read it allowed to you. In Mail.app, select the text then in the menus Mail -> Services -> Speech - > Start Speaking Text.

It's minutes of fun!

If you don't have any suitable spam, here's some to get you started:

In the painful condition of a stupid ass sunk country at a glance, and he would spend whole mighty have prevailed. the decision is made. Justice weakening their foes, then thou wilt not utter let him get war weary. These monsters in the south.

Damn those southern monsters.



December 11, 2008

Woolworths in 'discounts not big enough' outrage.

Writing about web page http://news.bbc.co.uk/1/hi/business/7776634.stm

Bargain hunters have been flocking to branches of Woolworths on the first day of a store closure sale at all its 815 outlets across the country.

Several shoppers have contacted the BBC to say that the discounts on offer were no different to those introduced last week, and said they were angry after queuing to get into stores to snap up bargains.

Perhaps they were angry with themselves because they'd realised they were the sort of self-entitled jerk who queues outside a bankrupt business employing ~30,000 people on the assumption that said business is obligated to sell off it's remaining stock to them for next to nothing and who then complains to the media when they discover that said business is failing to cut it's own throat to satisfy their moronic myopic magpie-esque blood lust addiction for buying stuff just because it's 'a bargain'.




December 10, 2008

Are you at least vaguely as smart as an 11 year old?

Writing about web page http://news.bbc.co.uk/1/hi/magazine/7773974.stm

I got 12/15. Got the last question wrong, looked back at the screen from some scribbling to crack the code for the Numerical Codes section just in time to see a message that I'd run out of time appear.


November 27, 2008

1969 Honeywell Kitchen Computer

Writing about web page http://www.theregister.co.uk/2008/11/27/tob_kitchen_computer/

What could possibly have been wrong with the idea that housewives in 1969 might want to store recipes on a $10,000 computer with a user interface consisting of mechanical switches and some small red lights.


November 19, 2008

Charlie Brooker's Screenwipe

Writing about web page http://www.bbc.co.uk/iplayer/episode/b00fpwb4/Charlie_Brookers_Screenwipe_Series_4_Episode_1

Charlie Brooker's Screenwipe (not to be confused with his screen burn) is back on BBC Four with more scathing observations regarding stuff what's on the tele. Watch it. Go on. It's only available for another 147 hours and 6 minutes. If you don't like it you can always write to Ofcom and complain.


November 13, 2008

More webcam/imagemagick experimentation

Writing about web page http://www2.warwick.ac.uk/about/campus/webcam

Click for larger

Images from University webcam styled as Polaroid snaps.

$ for i in `jot 4 1`;do curl -s http://www.warwick.ac.uk/newwebcam/images/webcamimage.jpg | convert -resize 50% - jpeg:- |  convert -crop +0+8 - jpeg:- | convert -caption "\n`date \"+%d/%m/%y %T\"`\n" - -bordercolor "#EEF2F3" -background black -font "Angelina-Regular" -gravity center -pointsize 20 -fill "#4668D6" +polaroid webcampolaroid_`date +%s`.png;sleep 5;done
$ montage   -geometry -0-0 -tile 2x2 -texture DSC01242.JPG webcampolaroid_*.png webcampolaroids.jpg

Change jot to seq if not using Mac OS X.


November 11, 2008

Most important meal of the day

This morning I had Coco Shreddies for breakfast. I wouldn't recommend them.


November 06, 2008

The joy of shell

Writing about web page http://ask.slashdot.org/askslashdot/08/11/05/2027234.shtml

There's a discussion going on Slashdot entitled "(Useful) Stupid Unix Tricks?".  (Clicking the 'Get more comments'  button at the bottom of the page a few times makes more of the discussion visible.) I love discussions like that because I nearly always pick up something useful.

A useful trick that occured to me this morning was to combine && with a kdialog yes/no prompt:

kdialog --yesno "are you sure?" && do_stuff


Of course stuff which is really useful on one Unix-like OS is sometimes useless on another. I work on Linux, but sometimes need to do something the multi user Solaris boxes such as mimosa or primrose etc and occcasionally get tripped up by differences. Though I've found changing my shell on Solaris to bash instead of the default tcsh and adding /usr/local/gnu/bin/ to the start of my $PATH helps!


November 05, 2008

Altering AutoYaST profiles on the fly…

...or: How to have one or more variants of an AutoYaST profile without having to actually maintain them.

Say you maintain a bunch of machines running some SUSE variant, you install them using AutoYaST so they're all identical but you find that sometimes you want to install a machine in a way which is slightly different to normal. For example, you want to be able to re-install a machine whilst preserving the contents of a particular partition. This presents a problem because it means you need more than one AutoYaST profile, the one you usually use and the variant. If you change the main profile you have to make the same changes to the variant. Maintaining a variant is going to be prone to human error, forgetfulness and possibly problems could be caused by trying to use a variant which you don't realise hasn't been maintained.

Faced with such a situation myself a neat solution occurred to me. My AutoYaST profile is accessed from a web sever at time of installation, so a script on the web server can be used to manipulate the XML on the fly and serve the modified version. This way only one AutoYaST profile has to be maintained but you can can have as many variants of it as you like provided you write a script to produce that variant. E.g. This PHP:

<?php
# reads the autoinst.xml file, alters the partition config data so that
# partitions are re-used rather than created, and /local is not formatted
# then outputs the new xml.

$sourcexmlfile="autoyast.xml";

$data=simplexml_load_file($sourcexmlfile);

foreach ($data->partitioning->drive->partitions->partition as $partition) {
$partition->create="false";
if ($partition->mount=="/local") $partition->format="false";
}

header('Content-Type: text/xml');
print $data->asXML();
?>

saved as a suitably named file on the web server and it's url provided as the source of the AutoYaST profile at install time allows machines to be re-installed whilst preserving the contents of the partition that gets mounted at /local.


November 04, 2008

Ross, Brand…. Clarkson?

Writing about web page http://newsvote.bbc.co.uk/1/hi/entertainment/7707641.stm

So Jeremy Clarkson has made an (arguably) offensive joke  about an entire profession on prime time TV and generated 188 complains within two days of broadcast.

The recent exploits of Messieurs Brand and Ross were (sort of) aimed at two people, generated two complaints immediately following broadcast* and resulted in Ross being suspended for three months and Brand and the controller of BBC 2 both resigning. Based on initial complaints alone, Clarkson's offence is 94 times worse. So I expect the swift resignation of BBC Director General Mark Thompson, Clarkson, the entire Top Gear production team, Hamster and Captain Slow because they were near by at the time the joke was made, and the destruction of the master tapes for all previous and as yet unbroadcast episodes of Top Gear and any other show in which Clarkson has appeared on the BBC.


*Rising to over 30000 once the Daily Mail got hold it and whipped up a media frenzy allowing people who had never listened to Brand's radio show to complain. A frenzy which if anything merely exasperated the initial incident by making sure the entire nation, rather than the relatively small number who listen to Brand's show or podcast thereof, knew what Andrew Sach's granddaughter had been up to and ensuring that he was harassed by hordes of reporters regarding it.


Search this blog

Tags

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXIV