Archive for the 'Uncategorized' Category

Multi-homed PCs and Proxy.pac

November 30, 2016

If writing a proxy.pac file for a site, you may need to determine which proxy to use based on the current IP address. Should your browser host have multiple IP addresses, e.g. you’re running VirtualBox in host-only mode, you may find the built in myIpAddress() method returns the wrong IP address. The following JS extract uses the myIpAddressEx() method – this returns all configured IP addresses as a ‘;’ terminated string.

The following defines myips.isInNet(ip, range) to replace the built in method isInNet (myIpAddress(), ip, range) and will check all configured ipv4 addresses rather than the random single value that your browser picks.

var myips = myIpAddressEx().split(";");
myips.isInNetX = function(ip, range) {
   var matchOne = function (acc, myip) {
       return acc || myip.startsWith("[") ? false : isInNet (myip, ip, range)
   }
   return this.reduce(matchOne, false); 
}

March 2, 2016

Title Case vs Sentence Case

Today I learned that was I inadvertently part of team Title Case. I was pulled up in it during a review of one of my Technical Documents. Sorry, there I go again. I promise to stop this annoying habit. From now on, any attempt to show prominence will use quotes, bold or italic characters. I will not use underline, nor blinking text.

Follow Me Printing on OSX

October 14, 2014

How I learned how to print to the corporate Windows based Follow Me print solution from my Mac.

Screenshot 2014-10-14 14.40.44Screenshot 2014-10-14 14.49.26

To do this, you first need to modify the Add Printer dialogue so it shows the ‘Advanced’ button. Bring up the System Preferences dialogue, Printer and Scanners then click on the ‘+’ in the bottom left of the window (I’m using OSX 10.9.5). The trick is to then control/click or right/click (or two finger click) on the icon bar so that the option to ‘drag your favourite items into the toolbar’ appears. Drag the ‘Advanced’ icon onto the original dialogue box (I also took the opportunity to hide the Fax icon whilst I was there).

Next click on the new Advanced icon, then select ‘Windows printer via spoolss’. Under URL I entered my FollowMe printer URL (in my case ‘smb://tuwigmps01/TUI_PRINTERS’. Select either the Generic PCL or PostScript printer, and click on the Add button in the bottom right.

A number of ‘setting up’ dialogues then appear, including the option to authenticate. This is your opportunity to log in using your corporate credentials, including the Windows domain controller – so that the printer knows who you are. Assuming you’ve previously created a printer PIN or associated it with your security pass etc. you should be good to go.

Update: if you change your domain password, use the Keychain Manager to update the password for the printer device. You might find some jobs remain in the state ‘Hold of Authentication’ if so you might have to delete these and resubmit them.

Work Hard Play Hard in India

February 19, 2011

Averaging 9 hour working days at present, so all the time saved not commuting is going on work. Taxi leaves hotel at 0930 and leaves office at 1930. Usually get back by about 2000. Hotel breakfast is crap, for lunch there is no option but to eat at the office which is basic at the best so we have to go out at night to get a decent meal – which is invariably curry of some sort, so beer is kind of functional. Everything shuts at 11pm here, 1130pm if you’re lucky so we’ve only got a limited time. So it sounds great but in reality it’s all a bit hectic. There is no Internet access at the office so difficult to keep in touch, although I discovered a Wifi access point by reception on the ground floor today, so I can Skype from there and pick up email – but only on my phone as personal laptops are not allowed in the building. I’m also not allowed to take photos of the office. Today was a working Saturday, started pairing with the developers and feel like I’m starting to contribute now, which is a good feeling. I’ve spent the last week trying to understand what they’re trying to build, and assess how best to help. We’re trying to introduce a way of working called Agile which basically gets people to communicate, contribute as part of a team and take ownership of the issues that arise. So far it seems to be helping, but there is a huge amount of work still to do and not much time to do it in.