Monday, 30 January 2012

Chris' Better Jam Cams

No one likes to get stuck in a traffic jam.  Much less one that could be avoided.  Even more annoying is the 'jam out of the blue' on what is usually a clear piece of road...

Short of pulling an 'Italian Job 1969' (original and best!!) and driving through shopping arcades, up on roofs, across weirs etc what can you do to avoid such jams?

Luckily we can spot traffic issues for ourselves from the comfort of our own homes using the excellent UK Highways Agency / BBC Jam Cameras site.

That said however, there is just one slight annoyance with this site; namely you can only view one camera at a time.

This is where Chris' Jam Cams page comes in!  OH YES!


An all in one dashboard showing all the Jam Cams you are interested in, plus a frame detailing traffic conditions in your area.  Whats more, you too can follow what I've done here and create your very own Jam Cams page.  Dead easy.

So how is it done? It is really quite easy.  What follows looks a minefield but it isn't all that complex.  I promise.

The golden rule here is SIMPLICITY: I want to be able to do all of this using just one html file.  Whilst I am positive that there are cleverer ways of achieving the same results,  I'm purely after something dead simple to write, understand and maintain as and when required (in other words, please don't laugh at my html code!!)

Grab Your Copy
First step, grab a copy of Chris' Jam Cams from Github:

Chris' Jam Cams - Original.  Should work in any browser on any platform 
Chris' Jam Cams Mobile - Includes a couple of layout tweaks to make it easier for mobile viewing

Cut and paste a copy into a text editor of your choice.  (Notepad on Windows is just fine).

Traffic Images
First step is to define your images. Dead simple, just make sure each image has a unique id.  For example, I've used the motorway and junction number.  You need one img statement per traffic image.
img border="0" height="261" width="320" src="#" id="M20J7" alt="M20 J7"
Now for the picture handling.  Load up the BBC Travel News page and select the area you are interested in.

Next, click on the "Traffic Jam Cameras" button, just above the map.

Lastly find a motorway junction camera that you are interested in right-click the link and choose "Copy Link Location" (firefox) or "Copy Shortcut" (IE).  Open a text editor (eg notepad) and paste the text in.

You should have a piece of text that looks something like this:
http://www.bbc.co.uk/travelnews/kent/trafficcameras/highwaysagency
/16588?epoch=1234567890&enabled=1&asset=16588.jpg
From this you are only interested in two pieces of information:
  1. The region (kent in the example above)
  2. The camera asset number (16588 in the example above)
Enter the region and camera asset number into the 'document.getElementById' statement towards the bottom of the Jam Cams html page (I suggest copying, pasting and editing the example given in the github file):
script type="text/javascript"
var d1 = new Date(); 
var eptime = parseInt(d1.getTime()/1000);

document.getElementById('M20J7').src="http://www.bbc.co.uk/travelnews
/kent/trafficcameras/highwaysagency/16588/image?epoch="+eptime+
"&enabled=1&cachebuster="+eptime;

document.write("Page Last Refreshed: "+d1);
/script
Lastly update the img id to match the id you chose earlier ('M20J7' in the example above).
Save your Jam Cams page and test.

Traffic News
The travel news is pulled from BBC mobile site using a simple iframe:
iframe height=750 width=600 align=right src="http://www.bbc.co.uk
/mobile/travelnews/search/process/page/1/filter/road/q/kent"
Replace 'Kent' in the src tag as required.  (Suggest using the Traffic Images region found above)

Jam Cams Mobile
As mentioned above, this file is a slightly tweaked version of Chris Jam Cams.htm that hopefully renders slightly better on smaller screens.  Update with your own Jam Cams in the same as the non-mobile version:


DO NOT USE THIS WHILST DRIVING!
(Goes without saying really)

Job done.  I usually save the htm file on my desktop.

Jam Cam images copyright? OK:
Highways Agency Traffic Cameras Standard Terms and Conditions
Reproduction for Private Use
The traffic images are Crown Copyright protected and may be reproduced free of charge in any format or medium as long as it is for non-commercial research, private study - subject to the material being reproduced accurately and not used in a misleading context.
No problems there then.

As I say, The golden rule here is SIMPLICITY: all done using just one html file.

Enjoy.

- Chris

Monday, 23 January 2012

Access VM Consoles From Linux

So you want to access the consoles of your VMware virtual machines, yet your chosen administration client is running Linux?

No problem.

Sure VMware provide the vSphere 5 Web Client, that can be used from a Linux client (or Mac or whatever) however to use this you have to install the vSphere 5 Web Client Server on your Virtual Center server in order to be able to use the client.

Not all vSphere implementations need or run a Virtual Center server - let alone a dedicated web client server.

Here is how is how to access your VMware VM consoles from a Linux client using the VMware Remote Console Plug-in application, and how to create a launcher so the application runs happily, even under Gnome 3.

  • In your home folder create a new folder called vmware and navigate to it:
mkdir ~/vmware
cd ~/vmware
  • Grab the VMware remote client from here: vmware-vmrc-linux-x86 (21.3Mb, from my dropbox account) [see below for alternatives] and download it into the vmware created above.
  •  
  • Extract the downloaded zip. Use the following command:
unzip vmware-vmrc-linux-x86.zip
  • Navigate to the plugins folder created by unziping the downloaded file:
cd plugins
  • Create and edit a new file called vmware-vmrc2.  Use the following command:
gedit vmware-vmrc2
  • Paste the following into vmware-vmrc2 and change the $PATH_TO_VMRC variable (currently "/home/chris/vmware/plugins") so it points to the folder plugins you've extracted earlier:
#!/bin/bash

# Please define this variable with the path to the plugins folder
PATH_TO_VMRC="/home/chris/vmware/plugins"

export VMWARE_USE_SHIPPED_GTK=yes
cd $PATH_TO_VMRC
./vmware-vmrc > /dev/null 2>&1 &
cd - > /dev/null 2>&1
  • Change the text highlighted in blue to match the location of your vmware folder created in step 1.
  • Save and close the file and then change it to be executable:
sudo chmod +x vmware-vmrc2
  • Launch the VMware remote client using the following command:
./vmware-vmrc2
You should be presented with the following (after accepting any security prompts):


Enter the details of your VMware ESX / ESXi server  and hit connect.

Job done!

I especially like the VM menu the client provides upon successful connection.  Something like this:


Pick a VM and go for it:


Grab your own install
Alternatively if you do have access to a Virtual Center server, you can grab the file from "C:\Program Files\VMware\Infrastructure\tomcat\webapps\ui\plugin" Also available in this folder are 64bit Linux and Windows versions of the remote client.

The file linked to in the process above is a v3.0.0 build-418557 client with the extension renamed from .xpi to .zip to stop Firefox trying to install rather than download.  As .xpi files are .zip files in disguise, the process above will remain the same.

If you don't have access to a Virtual Center server and you don't want to use the client linked to above, a third place to grab the client is here: https://github.com/vmware/rvc/downloads

Thanks should goto Joel Bastos for this workaround, originally posted here

- Chris

Thursday, 19 January 2012

Disable IE Enhanced Security

Another one to file in the "Yes, done that before, but I can't remember how" pile. Probably because it is so easy to do has some bearing on not being able to remember how...  Anyway, here is how to disable Internet Explorer Enhanced Security Configuration (aka IE ESC) on Windows 2003 and 2008 Servers.

Yes I know, IE ESC is a security feature there to protect the user and it should never be disabled etc etc etc. However most of the time it is 'a right royal PITA'.  So here goes then.


Windows 2003
Control Panel, Add or Remove Programs, Add/Remove Windows Components:


Disable or enable as you please.

Windows 2008 / Windows 2008R2
Run the following:
servermanager.msc
Check current status and / or make the required changes here:


On clicking Configure IE ESC:


Disable or enable as you please.

So there you have it.  One less pain to deal with.

-

Monday, 16 January 2012

Build it Again

Lego.

Hate it when stepping barefoot on a stray piece left hanging around or love it for keeping the kids quiet for hours... and hours.

What other toy gives you the freedom to design and build absolutely anything your heart desires?

Car? No problem.  Aeroplane? No problem.  Rocket to the moon? No problem.  Luna delta spaceship? Again, no problem.

Until a couple of years ago, a box of my childhood Lego resided in the attic, unplayed with but by no means forgotten.  I prefer to think of it "on hiatus", to be played with again at some point in the future.  That is until one day I retrieved it from the attic and introduced my youngest son to the world of Lego.  Could he be trusted?  Would it all disappear up the vacuum cleaner?

At the time I remember him almost saying, "hmm what is this pile of blocks for?  Where do the batteries go?  What you mean you have to build something?"

Of course after buying him some new sets and helping him build those he got the idea.  The big box of Lego from the attic were suddenly additional cars / houses / spaceships / whatever just waiting to be built.

So here we are a couple of years later and he is well onto Lego Techninc, and we are both still having a great time our Lego building.  For example, last weekend we spent just over 6 (yes SIX) hours* building this:


Here is it in full animated glory.  Winch, motorised tilting / lowering flatbed and wheel lift:


During the build the question "Daddy do you still have the instructions for any of your Lego?" was asked.  Unfortunately no I didn't... not any more.  I used to have build instuctions for houses, cars, trucks and space Lego - lots of space Lego (very popular in the 1980's!)

I still have the parts, but the knowledge to rebuild has long since passed.

Of course, me being me; some days later being presented with a empty Google search box (other search engines are available) and having forgotten what I was originally going to look for, I punched in "Lego instructions".  I was amazed when the results came back.

It turns out there are several simply excellent Lego instruction library sites out there, providing scanned instruction manuals for download.  That was it.  An hour spent in the quest to find all those long lost build instructions for as much of my Lego from the attic as I could.

By way of saying thank you to some of those library sites, here is a (by no means an exhaustive or ordered) list of the sites that have provided the Lego instructions from my childhood so that my sons may also enjoy building my Lego again:
  • Worldbricks.com - PDF downloadable instructions. Sometimes a bit slow, but well worth the wait. 
  •  
  • Letsbuilditagain.com - Online instructions.  Find your set and hit the blue arrow to view the instructions.
  •  
  • Brickfactory.info - Online instructions. More of a basic site, however still plenty there!
  •  
  • Brickset.com - No instructions, however good listing of newer sets, links to purchase sets on ebay and set barcodes (scan with Android barcode scanner to get best prices? ;))
  •  
  • Official Lego Site (direct link to instructions portal) - PDF downloadable instructions.  Of course, no list would be complete without mentioning this site!
  •  
  • Official Lego Technic Site (direct link to instructions portal) - PDF downloadable instructions.  As above, except for Lego Technic

If you don't own any Lego sets with perhaps some of the more specific pieces, then no need to worry.  These sites are still a great source of inspiration.  Look for the 1960 / 1970 / early 1980's instructions.   Some, if not most, of the realy early sets are made up of the more standard square brick variety meaning that anyone should be able to build them using whatever parts they have.

That should keep your little ones quiet for a while.  Perhaps you too.  Welcome to the world of Lego.... again!

- Chris

 *6 hours to build a flatbed truck?  Have a look at the three instruction booklets for yourself!

Wednesday, 11 January 2012

Sky HD: Highlight HD Programmes

So you have got a High Definition Television.  You have also taken the plunge and gone for a Sky HD box (other HD solutions are available).  You have even connected the two together using a propper HDMI cable and you have configured the two to use HD across the board.

So you sit down to watch some nice HD TV.

You spot your chosen TV channel's little 'HD' logo in the top corner, so you know that you are watching a HD channel. 

Final question; how do you know that the TV programme you are watching on your nice HD setup was actually filmed in HD?  Sure you could confirm by simply looking at the picture* but can you be 100% sure every time that the TV station isn't simply upscaling a standard definition programme?

If you are a Sky HD customer, then the fix is simple.  Configure your HD box to highlight programmes originating in HD in the TV Guide, like this:


Here is how to configure your Sky HD box to do the same.  All actions are done via the remote control.

1.  Whilst watching Sky HD, press Services button:


2.  Press Blue down navigation button, to highlight centre bar.

3.  Press Blue right navigation button to scroll to the CUSTOMISE option:


4.   Press Blue down navigation button, to select Highlight Programmes Originated in HD option.

5.  Press Blue right navigation button to enable the option (set it to ON):


6.  Press Green button to save changes.

7. Press Backup button to exit.

Job done.  Now you know that you are watching HD!

*Re spotting a HD picture: Hmm OK, how do I put this politely?
Here goes:  In my very limited experience, through a very small straw pole of asking friends etc, I have noticed that female of the human species rarely notices (or even cares?) that they are watching a TV show in HD.

Just stating what I have noticed, nothing more!  Please don't shoot the messenger!

Perhaps this article from 2006 helps to redress the balance: Why Women Don't Care About HDTV?

- Chris

Monday, 9 January 2012

New and Improved What The Mark IV!



Happy new year.  No your eyes do no deceive you, it is all change on the only blog that counts (TM).  Now it counts even more!!!

Hopefully you'll find the new site easier to navigate and find your favorite content.

As with all changes of this type, I'm sure are still some bugs to work out, so stay tuned and we will get this 'Cosworth powered Mini of a blog' up and running smoothly in no time.

Stay tuned and as always, have fun.

- Chris

Newer Posts Older Posts Home