20. October 2016

Building command line tools (CLI) in Node.js JavaScript from scratch

Originally developed from the JavaScript engine you find in browsers such as google chrome, Nodejs is a JavaScript engine for running scripts in a variety of other environments. Given the large amount of libraries developed for JavaScript it provides a very productive environment for writing quite sophisticated command line tools. The command line tools can be installed globally on your computer, and if carefully written will work exactly the same on Windows as on Linux.

There are a large number of tutorials on the Internet showing you how to install NodeJS, and principles of JavaScript programming, as well as several well equipped editors with syntax highlighting and code completion, so I won’t dwell on those points here, rather this tutorial will concern itself with the unique needs of developing command line tools, such as parsing the command line, saving settings, installation and so on.


01. October 2016

Free Hosting done properly!

While recently reviewing hosting options and looking at how to revive this blog, I was surprised at the services now on offer to provide hosting that don’t cost a penny. Going back in time, I have hired virtual machines, shared servers for dollars a month and more recently used Amazon S3 services very few dollars a month, with a bought-and-paid for SSL certificate. More recently I have discovered that all these services I have paid for in the past are now available for free. In this article I’ll run through the options I have chosen for this blog and what they offer.


11. August 2009

Firefox invalid security certificate error

(Error code: sec_error_untrusted_issuer)

Using the default settings, when you connect using Firefox to a site which is using an invalid SSL certificate. You will receive a warning like this.

Firefox friendly SSL Error Message

If you know the site, and really wish to proceed you have the option of adding an exception so that while this site continues to use this invalid certificate you will be able to visit it.

Recently my own copy of Firefox stopped showing this friendly page, and started showing this alert instead.

Firefox SSL Alert

The only way to add an exception seemed to be buried deeply in the options, and was extremely inconvenient to use. At first I blamed a recent update to Firefox and wondered if security had been tightened up for some reason. However later I realized I was in fact to blame. A setting I had altered recently had been responsible for this behavior. I do a certain amount of web site development and had recently been trying to understand a problem in a website. To that end, in order to see the real content output by the website when it was returning an error. I had turned of the friendly error reporting. It was this change that had upset in the in-line handling and adding of exceptions of SSL pages. So if you have done it yourself but forgotten how, or didn’t realize the side effect, or someone else changed the setting for you. Here is how to fix it:

Go to the browser url window and type:


Then in the filter control type in:


You will see that it is set to false, double click on it to set it to true, and you should get your normal SSL functionality back again.

Good luck!