Session Storage in IE not working

A note to myself:

If you are getting an “Unspecified Error” in Windows 10 when testing out sessionStorage in HTML5 from a local file – the answer may be that sessionStorage in IE only works under http, and not from a file on the local filesystem.

It will work in Chrome and Firefox, but not IE.

So – test in a different browser  – or host the file on a server and test it again.

Posted in Javascript | Tagged , , | Leave a comment

How to schedule tweets

Tweets can be scheduled pretty easily using Twitter’s own platform – TweetDeck.


New Tweet button

Select the “New Tweet” button – compose the tweet, and then select the “Sechedule Tweet” button. This will allow you to select the date and time of the tweet.


Schedule Tweet button


Selecting Date & Time

Posted in Marketing, Twitter | Tagged , , , | Leave a comment

How to use Twitter Cards

Twitter cards is the mechanism to have content from a webpage or video appear in a rich way within a tweet.
If you add some twitter specific metadata tags to a webpage – with things such as a description, and image, video or a download of a mobile app, you get a richer tweet for your twitter followers.

You are still putting the same URL onto Twitter – but Twitter will read the metadata tags and produce a better experience within the tweet.

Summary steps:

  • Create the content on your site
  • Decide on which of the 4 card types that you want (your content will help decide this)
  • Add the appropriate metadata tags to the webpage
  • Test that the tags are working correctly with the Twitter Card Validator.
  • Schedule or send the tweet remembering to include the URL.


a) Create the content for your site.

You arelready know the message that you are trying to communicate to the audience that you are trying to build. The guidance at the moment is that it has to be relevant and engaging for people. This means visually appealing – so pictures and of course video are necessary. This is the difficult step, but necessary and unique to your content. We’ll assume that it is created already.

b) Decide on which of the 4 card types that you want (your content will help decide this)

For most regular webpages it is likely that the Summary Card or the Summary Card with Large Image are appropriate – and easy to send out. The Player Card – in particular because it has to be approved, is one that will take a little more planning.

I have made some simple templates available on GitHub:

Summary Card is here

c)  Add the appropriate metadata tags to the webpage

This is the Sample Code for a Summary Card
meta name="twitter:card" content="summary" - Indicates the Card Type

meta name="twiter:site" content="@flicker" - The attribution for the card

meta name="twitter:title" content="Small Island Developing States Photo Submission" -- A concise title for the related content

meta name="twitter:description" content="View the album on Flickr." -- A concise summary for the content. Will be 3 lines in the web, and not seen on iOS/Android

meta name="twitter:image" content="" -- A URL for the content on the page (Should not be generic at all)

meta name="twitter:image:alt" content="Description in less than 420 characters for visually impaired users"

d) Test that the tags are working

The Twitter Card Validator. can be used to test that the tags are added correctly and it also shows what the tweet will look like (at least what the Card element of it will look like).

The Log window on the validator will show something like the following if it works:
INFO:  Page fetched successfully
INFO:  16 metatags were found
INFO:  twitter:card = summary_large_image tag found
INFO:  Card loaded successfully

If the URL is incorrect the message will appear something like:

INFO:  Page fetched successfully
WARN:  No metatags found

This can be somewhat confusing as the URL is incorrect and the message indicated that the page was successfully fetched. So – check the URL if you get any warnings on the log.

If the URL is correct, but you have an error then this is a possible output:

INFO:  Page fetched successfully
INFO:  15 metatags were found
INFO:  twitter:card = summary tag found
ERROR: Possibly invalid value (if specified) (twitter:description)
ERROR: Possibly invalid value (if specified) (twitter:text:description)
ERROR: Possibly invalid value (if specified) (og:description)
In this particular instance there were Open Graph “og” tags rather than Twitter tags present in the metadata which resulted in this output from validating the page

Note: It can be used to test some scheduled URL’s from a system like Blogger, where you preview the page, and then take the full preview URL and use that in the validator.

e) Schedule or send the tweet

The key here is to compose the tweet – remembering to include the URL.


Twitter Getting started guide:

Posted in Marketing, Twitter, Uncategorized | Tagged , , , , | Leave a comment

Solved: An attempt was made to access a socket in a way forbidden by its access permissions windows 10. OS10013, AH00072

Summary Solution

Shut down IIS

net stop was /y

which may unblock port 80.
Alternatively you can have your version of Apache listen on a different port – such as “8080”.


You are trying to start apache and getting an error

The Apache service named reported the following error:
>>> (OS 10013) An attempt was made to access a socket in a way forbidden by its access permissions.
:make_sock: could not bind to address

OS 10013



  • Check if port 80 is being used by any other process – “netstat -o”
  • Shut down IIS from the commadn line: “net stop was /y”

Alternative solution:

  • Edit the /Apache24/conf/httpd.conf file and change the port from 80 to 8080

Changing the port to another one



Posted in Apache, Error Messages, Windows 10 | Tagged , , , | Leave a comment

Setting up Apache 2.4 in Windows 10


The aim is to setup a simple webserver under windows 10, and not get lost in the Apache documentation as a first timer – so I’ll document what happens here.

Summary steps

  • Download the 64-bit version from Apache Haus.
  • Extract it to a directory (e.g. c:\dev\) – which gives c:\dev\Apache24.
  • Edit the c:\dev\Apache24\conf\httpd.conf file to reflect the correct path (line 39).
  • Run httpd.exe from the command prompt.


Use these if the pages/links change, so that you can re-create the steps.


When you find the download link on the Apache homepage there is a link to “Files for Microsoft Windows” – which will get us close to where we want to get to. However – even this directs us to one of five options, and from there you are at a home page and feels like you are starting all over again.

I picked a random one (Apache Haus) and downloaded the 64-bit version.


The file is a zip file in your downloads folder.

The default would be to extract the files to a c:\Apache24 folder – and this is what the documentation expects.

The default expects paths of c:\Apache24 where I have paths of c:\dev\Apache24 after the zip file is extracted to c:\dev.


The primary file to use when configuring for the first launch is the c:\dev\Apache24\conf\httpd.conf file.

Edit this and change line 38 to use the new folder location:

Define SRVROOT "/dev/Apache24"
ServerRoot "${SRVROOT}"

Save the changes.


Open up a command prompt and navigate to the c:\dev\Apache24\bin directory

Run httpd.exe:


If there are no errors/warnings then the cursor sits on the next file.


Just open a browser and type in


You should see content if it works.







Posted in Apache | Tagged , , , , | Leave a comment

ServerRoot must be a valid directory

Error Message

Syntax error on line 39 of c:……. .conf/httpd.conf: ServerRoot must be a valid directory.

ServerRoot must be a valid directory

What I am trying to do

I am trying to run a new install of Apache under Windows 10.


Edit the \Apache24\conf\httpd.conf file.
At line 39 and ensure that the path to the folder where your installation is. (i.e. where you unzipped the downloaded file).


Before – when we had an error

In my case, I extracted the downloaded file to the c:\dev directory so the change needed is highlighted below.

After the edit

How to test

Now try to run Apache again – by running the httpd.exe command from the command prompt. If you get a cursor sitting on the next line with no error, then you are okay, and can test it by opening a browser and going to: http://localhost


  • The default installation of Apache (2.4 in my example) expects that it is installed in the c:\Apache24 directory.
  • If you download the file and don’t extract it from the root of the c:\ drive then you will see this error.
  • The SRVROOT shows “/Apache24” as the folder – whereas on Windows you would normally expect to see “c:\Apache24” for a folder.

Request to visitors

Click “Like” if this helped and I’ll post more like this that may help you, or others in the future.
Feedback welcomed on style/format etc.

Posted in Error Messages, Syntax error | Tagged , , , , , | Leave a comment

TDD by Beck – Chapter 14 on GitHub

The code for Chapter 14 of TDD by Beck is now on GitHub


CH14: Change

Significant techniques are introduced here...though I had issues with Java 6 indicating that some methods (assertEquals(Object{}, Object[]) is deprecated.

* Added a Bank parameter
* Saw that the number 2 was duplicated in code and tests - so refactored it out from it as part of the rate
* A test for the ArrayEquals showed an assumption that did not work - so drove the direction of the solution....which was a separate class as a comparator (Pari)
* Wrote that (without tests!!!) as it was part of a refactorying.
* When there was an error - it forced a new test testIdentityRate() - which isolated the problem.
Posted in TDD | Leave a comment