Sunday, 31 January 2010

I see no ship....

Last night was a turning point in my life, I managed to emit a single tone fart which lasted for about 15 seconds, it was clearly the longest and possibly loudest fart I had ever done.

So loud was my fart it woke the wife up at 2am as she thought there was a timer alarm going off although in reality it was more akin to a ships horn in pitch and loudness.

This got me thinking that throughout life you need to gather feedback so I propose the PISS, the Partner Informative Scoring System.

With this you can provide honest and constructive feedback without fear of reprisals, in fact I believe it should be put into marriage contracts i.e "Do you promise to take the PISS whenever it is offered ?".

How would it work ? What use would it be ?

Well it consists of 3 simple scores, similar to the dancing programs on TV at the moment but not as shit.

Basically .....
Preparation - How well did the person prepare ?
Overall Content Delivery - How well was the item delivered or in the case of food, taste ?
Consideration for others - Quite often an important score.

Here's some examples.

Your going out and your in your best outfit, your wife pops on some jogging bottoms and dirty old white trainers, she asks "how do I look ?", normally your doomed if you answer anything to this but now you can answer "PISS 1,1,1", under the rules your wife can then ask for clarification to which you say "Preparation = 1 - you were ready in 2 minutes, Overall = 1, you clearly didn't think this through and look like shit, last but not least your likely to scare the living shit out of anyone looking like that".

Your child might put some hastily finished homework in front of you and ask "how's this ?", again you might say "PISS, 2,3,3" and advise a summary "Although you appear to have used paper and a pen it looks like a spider has drunkenly wandered over your work, you've clearly thought about others though as you've made notes from MSN in the margin".

Meal times is an area of considerable conflict to bringing PISS to the table should help.
Imagine you have just come home after a busy day at the office to find 3 burnt fish fingers, some lumpy packet mashed potato and the whole lot is swimming in green liquid from the tinned tepid peas inhabiting your plate.
Obviously you can shortcut any conversations i.e no need to wait until your asked, just shout "PISS 1, 1,1" - you may elaborate ... "Although I appreciate you have been at work too, taking 3 fish fingers out the freezer, charring them until they resemble charcoal and dumping them on a plate with globs of phlem and something resembling fish shit is hardly worthy of a score, may I recommend you return to the kitchen and attempt again a meal suitable for the master of the house ?"

I'm confident that if more people gave and took the PISS then marriages and relationships would be more stable, people can honestly and openly pass constructive comments without fear of reprisals or intimidation.

Wednesday, 13 January 2010

Review time ....


Just had a chance to watch District 9, some recent Sci-Fi films have been less than impressive - I'm a great fan of the original "Day the Earth Stood Still" but the recent remake was very wooden (Although I did like the "Your planet ?" bit), War of the Worlds was OK though and had some nice special effects, it's difficult to escape the "shoot em up" genre of some Sci-Fi films though.

District 9 was spot on, flawless special effects, documentary style film making (similar to cloverfield) and a cast of nobodies so you had no pre-determined expectation on the key characters.

Great touches like the aliens being called "Prawns", signs "Non-Humans banned" etc on shops and parks etc, alien weapons that won't work when held by humans and my favorite bit, the aliens obsession with cat foot (you can barter anything for cat food).

All I'll say is what a hell of a film, one or two moments of wooden acting (the Mercenary commander for example) but a top notch film - Hopefully they will make a sequel and the aliens will return and put humans in the slum camps ?

Sunday, 10 January 2010

I found one !

After more than 3 weeks of snow and Ice I finally witnessed the rarest of breeds seen in the British isles, a gritter.
It plodded past me on it's lonely journey, oblivious to the fact that it's numbers are obviously dwindling and soon they will be an extinct species.
Amusingly the hill it gritted as I traveled home was virtually impassable the next morning so a cruel twist of fate if ever there was one.

True to form the local council then announce they only have enough salt for the next three days i.e until today and they have been putting less on the roads to conserve stocks - now anyone with a radio or TV will have seen plenty of notice about the snow and ice coming and plenty of notice that it was going to be here for quite a while but as usual these things always revolve one thing and one thing only - Money.

Fair enough, I don't expect my cul-de sac to be gritted (it never is) and once we were snowed in until all the residents dug the entire road out but you expect Main arterial roads to be usable.

Trundling down the main A38 was "lively" to say the least with more icy patches than a badly organized wedding anniversary, most people were being sensible and driving in the inside lane but as usual you get the loonies who think it's dry and sunny, you can see them sliding as they fight to control their vehicles but death it seems is not a deterrent for this part of the gene pool.

I got onto the Motorway which was better and was passed by Captain "I'd like to die soon" in his BMW at well over 100mph, now had he bothered to look through his tinted view on the world and actually realize the other objects moving near him were other motorists he would have seen that anything rear wheel drive was having serious issues in this weather.

So at the moment we have the local council not putting anywhere near as much grit as they would bother to, gritters nowhere to be seen anyway and the whole system creaking under strain. In the confusion and general fun and games it's nice to see the loonies don't care if it's gritted or not, they see such things as mere inconveniences anyway.

The perfect example of this was a part of the A38 that widens to 4 lanes (left lane turns left, 2 middle lanes are straight on and the right hand lane runs for about 250 yards then filters right).
Bear in mind the right hand lane had 4 inches of snow on it and only the left and middle lanes were clear enough to use I spotted a Zafira shoot out of the middle lane into the outside lane (people often use it to try and out run the traffic because they can't wait 10 seconds), he was about 200 yards in front of me and obviously wants pole position at the lights.
The lights changed and off he pops, all you could see was snow spraying from his wheels, his car slipping and sliding left and right violently and amusingly all the traffic undertook him, he then got to the limit of this lane and decided to try and swerve his car in front of me - Under normal circumstances he would receive a good dose of my car horn and hopefully lip read the word "Wanker" as he makes eye contact but in this case I decided it was better to let nature take it's course as I'm due a new car soon so if he smashes the right hand side up then it will just speed up the process.

Unfortunately Mr. Dim the driver of the Zafira noticed me just in time and in between his slipping and sliding managed to slip in a few cars later on.

I often think the real issue in this weather is these idiots, yes I like to drive fast but there is a fine line between placing the odds in your favor or against when it comes to obtaining fairy wings and a harp.

No amount of grit will get past these people, I'm sure they have an anti-grit mentality anyway, I've seen more cars in ditches than ever before and looking at the skid marks many of them were doing a fair whack.

So the freeze continues, Britain is running out of grit and the loonies are happy anyway, darting about the roads wondering what the problem is and smiling out their tinted windows as they look upon a world that one day they hope will conform to their way of thinking and abandon common sense in favor of all out stupidity.

People may think I'm being harsh but if your out in these twitchy and unpredictable conditions take a look at them as they zoom past you and smile as you know it's only a matter of time until they get enough points on their card to qualify for the celestial wings and harp.

Wednesday, 30 December 2009

Ubuntu Motion


After fiddling with my webcam a bit more I'm now trying "motion" for Ubuntu, it offers motion detection, automatic recording and live video streams etc.

it's installed easily enough from the repository and my video camera is /dev/video0
(You can find out by entering the command "ls /dev/video*" at the command prompt, if you see only one device then your webcam is on that device).

I also set it to slightly different file names for my motion files so it records into a separate directory for each day.

Snapshots are set to 30 seconds.

My camera is an OV511 model which uses the original Video 4 Linux (v4l) drivers - motion and camarama for example use v4l2.
This can be sorted by prefixing the execution command with "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so"

It's a bit tedious to remember to put this in though so the next best thing is to alter the bash default script so it pre-loads any time you run a bash script (it doesn't take nay noticeable memory up anyway).
with ubuntu its a case of editing /etc/bash.bashrc and including the following line.
export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
This pre-loads it when the bash script runs.

I know this works, if I simply type "motion" at the terminal then it runs fine.

I now have motion detection on my webcam with totally configurable parameters and a timed upload to the web page every 30 seconds.

When motion is detected I can save pre-buffered frames i.e a number of frames before the motion was detected, a number during motion and a number after.
It will even compile SWF or mpeg videos !

Whats nice is that the still image uploaded to the web page has the motion marker detailing what was detected.

Another good thing is that this program can run as a daemon so it releases the terminal once launched, I can then control motion detection through a web interface.
A cron job can then tell it to start and stop as there's not much point saving images at night.
These commands enable motion recording 8:00 until 17:00 each day.

0 8 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null
0 17 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/pause > /dev/null

Cpu usage is very low, hardly noticeable and yet another brilliant utility from the linux community.

Friday, 25 December 2009

Ho Ho Ho

Well it truly is Christmas, Not only did the local council grit the pavements yesterday (despite the snow melting) then today we wake up to find someone has jumped over a barrier and attacked the Pope.

It's the spirit of giving and obviously the woman who did it gave the Pope a trip.

After a massive 4 hours sleep the beef joint has been slow cooked and the Turkey crown is in so now I fully expect the daily Homeserve and Scottish Power phone calls asking me if I want my pipes covered or switch to another supplier.
Their latest scam appears to be leaving a voice message on your answer phone that is very clever, it deliberately leaves off the company name than says "has called" and then tells you that they are required by law to notify you of their call by recorded message.

Now if anyones reading from one of those companies then in the true spirit of Christmas I would like to tell you all to Fuck off and grow up.
It's pure stupidity playing on peoples fears as the latest message says "do not be alarmed by this call", well people will be - to get a message from a company that leaves no name and then says they will call you back etc is just gross negligence.

They say that Christmas is the time of giving so should any of these idiots ring today I'll make sure to post everything I can and piss them off as much as possible.

Time to check the Turkey and wait for Scottish Power to call, then in my best spirit of Xmas I think I'll just put the phone next to the parrot and let him take the call.

P.S even if your on TPS these clowns don't seem to care, and never ever get rid of them by asking them to post details, under law this is an invitation to trade - we did that many years ago and found they had not only signed us up but canceled our existing supplier (who we were more than happy with).
Thankfully our supplier called us and offered to sort it out (which they did), Scottish Power then had the nerve to call us and give me a mouthful saying "so your not interested in saving money then ?" - nice sales touch there lads.
And their "we'll we've signed you up now, you have to wait at least 30 days to cancel", to which I said "Charge me 1 penny and I'll see you in court".

So to sign off for this Festive post, Happy Christmas to everyone except Scottish Power or Homeserve, may you never call me again or attempt to communicate with me.

Wednesday, 23 December 2009

Lost - if found, call your local Council


As usual in the UK we get a touch of Winter weather and all hell breaks loose, I traveled 70 miles from the East side of the Pennines to the West side and you could see the difference in the regions I went through.

My region appear to have given up and gone home for the Winter, Derby have gritted most major roads well and Staffordshire (A50 through to Stoke) was gritted perfectly.
The issues seemed to be once you left the major roads, anything less than a main arterial road was left to fend for itself and certainly at my side of the country anything less than the motorway was left in a "rurual" state.

Over the course of a week I've not seen one single gritter out or anything clearing the roads - the councils will make all sorts of excuses but there's always only one reason they won't do anything ..... Cost.

It's far easier to stall for as long as possible then like the years before they will bring the gritters out once the weather forecast is for a thaw, I laughed as they gritted the already melting roads once and they announced on the radio that they didn't grit due to the risk of the grit being covered by fresh snow or the ice re-freezing, remember those "idiots" your trying to fool on the radio will have a casting vote next polling day.

I've even seen it where they blamed the issues on the wrong type of grit, it's not hard guys, you get some grit, pop it in a gritter and throw it on the roads. When they did that I counted 7 cars that had slid into ditches in a 4 mile stretch of road, the council blamed the wrong grit, I blame the idiot who was in charge of it ?

The best excuse this year has been the buses decided it was too slippery to go out (despite the fact the bus lanes are supposed to be gritted), so the buses didn't run, because of that the gritters didn't seem to bother so no one won and the process repeated.

Anyway, if you see one of these yellow lorries be sure to stop it and ask the driver if he's lost.
If he asks why, tell him that he surely shouldn't be on the roads as he's obviously the last of his kind and should anything happen to him then they will be extinct.
I may help to advise him that he's obviously wasting his time as if the council risk assessment team have deemed it safe enough to send him out then the snow will most likely melt in 24 hours anyway. I suspect he will have a full escort complete with ambulance and overhead helicopter anyway in case he gets into difficulty, lest he sues the council for sending him out in slightly wintery weather.

I would probably stick two fingers at him then, pop a nice raspberry at him and wish him a "Happy fucking Christmas for bothering at all", maybe the councils will realize one day or maybe I'll skid on a bend and land my car in the reception of the local council ? I'll be sure to use my emergency window hammer to break a side window and call them a bunch of pen pushing clowns before the Fire Brigade cut me out.

Happy fucking Christmas you slack arse overpaid, overbearing, risk assesment idiots - except Derby and Staffs Council who gritted their roads to the point where you could actually use them safely.

Maybe Nottingham and Ashfield council will read this, maybe not - do I care ? Nope, as they will be far too busy performing risk assessment on their toilet paper in case it causes sore arses.

Sunday, 20 December 2009

Ubuntu webcam & server


I Had a couple of webcams sitting around which Windoze hates - typical 80mb or larger install iles, temperamental operation and the usual "one minute it works, next it's no longer supported" stuff.


Linux uses V4L (Video for Linux) so if your camera is support and I'm amazed how many are) it's often just a case of plugging in and off you go.

A simple test program first is Cheese (sudo apt-get install heese), this grabs whatever camera you have plugged in and shows live images from it, you can edit them etc.

Another indication the camera is working is either check the lsusb command or look for a video device in /dev/videox

lsusb on mine shows.
Bus 005 Device 002: ID 05a9:0511 OmniVision Technologies, Inc. OV511 Webcam

listing the contents of /dev/video I get.
ls /dev/video*
/dev/video0

So I know by these two commands my webcam is detected anyway, its an Omnivision OV511.
Another package worth using to check is Xawtv - this shows which driver it's using, screen size etc I ran that and it shows the Omnivision driver is actually the ov519 driver.

So I now need to capture my webcam and upload it to the web....

There are several utilities including camorama (this works best with V4L2 webcams) and although had this working in mere moments I decided to use "webcam"

sudo apt-get install webcam

This installs webcam which is run from the command line (just type webcam).
First though you just need to make some pretty simple changes to it's config file (which is held in your home directory but hidden ie. has a full stop in front of the name)

sudo gedit ./webcamrc

The file has two parts, one for the Grab itself i.e size, frequency etc and another for the FTP bit.

[grab]
device = /dev/video0
text = "webcam %Y-%m-%d %H:%M:%S"
# infofile = filename
fg_red = 255
fg_green = 255
fg_blue = 255
width = 640
height = 480
delay = 60
wait = 5
input = ov519
# norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 75
trigger = 0
once = 0

[ftp]
host = upload.website.com
user = myusername
pass = mypassword
dir = Cam
file = Webcam.jpeg
tmp = uploading.jpeg
passive = 1
debug = 0
auto = 0
local = 0
ssh = 0

Now I have my webcam config file (I commented out the PAL format as I was not sure what format this camera did but it seems to work fine with that commented out).

I made a simple web page but this will dump the file into my webpage home directory in the /Cam folder and call the image Webcam.jpg

To run webcam you just open a console and type "webcam"
It shows output as it uploads to the ftp site so you can leave it like that if you want and if connection gets lost you would see connection errors.
I wanted to run it without the console being open, there are plenty of people giving help and the command is ...

webcam > /dev/null 2>&1 &


If you run this it will return the process number for webcam i.e

kevin@server:~$ webcam > /dev/null 2>&1 &
[1] 17709

run the PS command to confirm it's running

kevin@server:~$ ps
PID TTY TIME CMD
8360 pts/2 00:00:00 bash
17709 pts/2 00:00:00 webcam
17755 pts/2 00:00:00 ov511-decomp
17856 pts/2 00:00:00 ps


That's it really, it uploads every 60 seconds ( I put delay=60, the wait=5 gives the camera
5 seconds to form an image once the command is issued)
I've also used a simple Java script from http://www.ajaxcam.com/ which makes the main webpage refresh every 60 seconds as well.

if you go to the cam webpage then there is no need to click refresh, it keeps up with the image.

The Ubuntu man (manual) page for webcam is.
http://manpages.ubuntu.com/manpages/lucid/en/man1/webcam.1.html

Although it does not contain a lot I found this site to help a lot.
http://blog.mymediasystem.net/uncategorized/setting-up-webcam-on-linux/