Wednesday, 15 June 2016

Programatically create an Outlook appointment

I am constantly creating 'Intercall' meetings so I:

  1. Create an appointment as a .oft file.
    This will be the template for these new appointments.
  2. Add the code at the end of this article to the VBA Project.
  3. Add a button to call the 'Intercall' procedure.
    e.g. As a Quick Access Toolbar button

Saturday, 30 April 2016

Easily update your 'newsletters' rule with e-mail sender addresses

If, like me, you get inundated with 'informative' e-mails which you would like to get around to reading some time so don't want to unsubscribe, but you don't want them cluttering up your inbox then read on.

The following shows how you can easily add sender's e-mail addresses to an existing Outlook e-mail rule which, for example, moves these e-mails to a 'read later' folder.

The following VBA code finds the 'current' e-mail or selection of e-mails and adds the e-mail sender(s) to the named rule.

Wednesday, 27 April 2016

Unable to do Xamarin development on an Azure VM

It seems that the Xamarin emulator uses Hyper-V.
It's not possible to add the Hyper-V role to an Azure 2016-R2 VM in Azure.

Saturday, 19 March 2016

MySQL Compare doesn't recognise UNIQUE KEY column lengths

I have a Joomla! table:
CREATE TABLE `jos_messages_cfg` (
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `cfg_name` text NOT NULL,
  `cfg_value` text NOT NULL,
  UNIQUE KEY `idx_user_var_name` (`user_id`,`cfg_name`(100))
MySQL compare doesn't recognise the UNIQUE KEY column length.

Which results in:


  • It should pick up the UNIQUE KEY correctly
  • It's a shame it's not possible to copy the error from this error dialog
  • Errors do NOT result in an option of a re-compare

SQL Workbench 6.3 unable to dump db

Dumping all tables I get: mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'

The answer according to:

is to change the Python so it doesn't spit out the variable :(

Saturday, 5 March 2016

Bulk delete GoDaddy e-mail forwarders

Unfortunately even restoring e-mail forwarders from backup doesn't delete existing forwarding addresses.

I created the following script to do some batch deletion.

  1. Use Chrome (for example) to open the forwarders page (e.g. .../frontend/gl_paper_lantern/mail/fwds.html)
  2. Filter the forwarders you want deleting.
  3. Open the developer tools (F12)
  4. Paste the following into the Console

(function() {
var popups = [];
$('a[href*="dodelfwdconfirm.html"]').each(function(i) {
var url = $(this).attr('href').replace('dodelfwdconfirm','dodelfwd');
popups[i] =;
setTimeout(function() {
}, 2500);

Thursday, 18 February 2016

JavaScript lighten RGB by a percentage

// colour: numeric rgb representation
// percent: -100..100
function lightenRGB(color, percent) {
 t = percent < 0 ? 0 : 255,
 p = Math.min(100, Math.abs(percent) / 100);

  function lightenComponent(bitShift) {
    var c = color >> bitShift & 0xff;
    return (Math.round((t - c) * p) + c) << bitShift;

  return lightenComponent(16) + lightenComponent(8) + lightenComponent(0);