Monday, April 11, 2016

FakeSMTP: A Mail Server Emulator

FakeSMTP is a java (jar) application that you launch on your development environment that can act as an SMTP server (receive mode) for testing email functionality in your applications.  You can open up the emails in FakeSMTP, which will launch your email client for viewing.

Example of a ColdFusion web service for AngularJS using $http and JSONP

A small example of a ColdFusion JSONP Web service using $http, that expands on Ben Nadel's excellent article on Using JSONP With $resource In AngularJS.

Form Submit Code for the AngularJS Controller

$scope.onSubmit = function(){
          method: 'JSONP',
          url: 'http://your_site/your_cf_jsonp_service.cfm',
          params: {
            callback: "JSON_CALLBACK",
            data: $scope.formModel
        function successCallBack(response){console.log("returned");console.log(response);},
        function errorCallBack(response){console.log("error"); console.log(response);}

Sample ColdFusion AngularJS JSONP Service

<cfsetting showDebugOutput="No">
<!--- Configure the Access Control header for your environment --->
<cfheader name="Access-Control-Allow-Origin" value="*">

<cfparam name="url.callback" type="string" default="angular.callbacks_0">
<!--- Do processing logic, create objects, etc.
then serialize it
Just going to send back a time stamp for this example --->
<cfset result = Now()>
<cfset response= "#url.callback#(#serializeJson(result)#)">
<cfcontent type="text/javascript; charset=utf-8" variable="#charsetDecode(response,'utf-8')#" />

Sunday, April 10, 2016

Editor Conundrum

VI, Pico, NotePad++, HomeSite, ColdFusion Studio, DreamWeaver, Eclipse, CFBuilder, Atom, Brackets, Sublime 2/3, and on and on...

I've used them all.  Some are specific to the OS and never go away (VI,Pico), some become so aged that you must toss, and others you just keep around.    There's never a perfect blend, those with that one feature that you'll need to go back to.   Sometimes you're in code mode, where it's all about the language your working in, code completion, snippets, color syntax, and then there's the visual side, where you need to make a change and see the result.

The progression of HomeSite -> ColdFusion Studio, switching to Dreamweaver, then to Eclipse with the cfeclipse plugin.  The shift to eclipse was primarily because I had switched from the type of employment (working for a software manufacturer) where the the perks of free software dried up.  Forking out over a hundred bucks for an editor often leads to a do-with-out approach on some features.  Yes, I'm cheap that way.

With Eclipse, I have the various configurations for Java, PHP, and ColdFusion.  But as with anything Eclipse is a bit persnickety and often hangs with that awful opaque white overlay as it's trying to do something and you HOPE it comes back.  You end up having to turn off many features that you find useful when the files you're editing have more lines they they probably should have.

Recently I did fork out $70 for Sublime, which was under my $100 think about it threshold.  It's fast, extensible, styles well.   A very good editor.  I added a plugin to launch a browser, all well and good.

But I wanted more....

I wanted side by side live preview for a particular bit of code I was working with.  I performed a small search for live preview, but it's all about opening up a new browser window which it happily does on my other screen that I'm multi-tasking on, right on top of everything.

Well, I've also happen to have Atom installed, which is chromium based. I search for live preview and Ding Goes the Bell!

So for the current task of the day, I'm switching to Atom.  Once I go back into pure code mode, Sublime takes over again.

Saturday, April 9, 2016

Google Domains So Far

Google Domains and/or Blogger still has a bit of work to do on their redirect.  The interface to redirect is fine, it's just that using the desktop times out regardless of network used, but with my iPhone, no problems occur with both m=0 and m=1 for the mobile setting (using WiFi).    Initially this setting worked when I first set it up, then it died.  

The problem is it isn't anything I've done.  It's just going to Google Domains, and connecting the Blogger account, and Google Domains/Blogger do the rest.

I've disconnected the the redirect and the old works fine, in fact it worked fine yesterday.  Today I'm having problems again.  so I followed the same disconnect/reconnect, and desktop chrome (and other browsers) are timing out.     

Since the iPhone can connect perfectly, mobile or desktop version, but the m=1 automatically shows up on the iPhone.  It almost seems there's something in the client detection that fails.

So this time I've disconnected it again, deleted the synth record.  and tried a standard redirect of to  This keeps the blog working only the redirect will not function.  when a custom domain is setup on Blogger, it disables in the standard {domain} url.

Friday, April 8, 2016

Running JSBin Local

I'm a big fan of JSFiddle, but unfortunately, being a SaaS solution, I can't run it local on my laptop for those situations where internet isn't an option.     I started looking at some alternatives, such as the older jsbin.    jsbin is both open source and SaaS.  However it does have one big issue, it doesn't install well on ANY operating system with the latest version of Node.jsand npm.

I spent hours trying to get everything running, first I tried Windows after making sure I had all the development dependencies in place, Visual Studio, the correct version of .Net Framework, the sdk's and so forth and then the latest version of NodeJS and npm.  Then following that which what should be the easiest install (In administrator mode)   npm install -g jsbin.


First, there are a couple (maybe more) issues with Node.js, and npm on Windows.

First is the rather onerous task of getting all the Windows development pre-reqs in place just so the  node-gyp add-on build tool is in a somewhat workable state.

Second is the default usage of using the users AppData/Roaming folder for npm modules.  This particular folder has policies applied that npm just doesn't like, such as CryptoLock prevention (at least on my system).  Which is a good thing, given some of the security issues with NodeJS currently, but it's a mish-mash of configuration settings trying to set up NodeJS/npm to use something other than that folder, setting the prefix and so forth.

After going down that rabbit hole, I opted instead to fire up a vmware of the debian sort; Mint KDE.  Which has most of the development dependencies already there.  MySQL and MySQL Workbench installed without any issues with openssh-server, and easy installation of the others through apt-get along with the added benefit of being sandboxed and snapshots.

Again,  sudo apt-get install nodejs, sudo apt-get install npm, sudo npm install jsbin


The solution,  uninstall nodejs (or in my case revert snapshot), sudo  apt-get install nodejs-legacy (which uses a symlink) , sudo apt-get install -g npm, and then sudo npm -g install jsbin.

and then the crossed finger moment: jsbin....


The next step is to try and make mods to the jsbincode. The github jsbin repo  doesn't build currently so more troubleshooting.  I still need to update the resource strings to point to the local versions, with expansion of some newer js and css libraries, which I'll place on the VM Nginx.   o

I know the folks over at jsbin don't have a lot of incentive to update their open source project and instructions to the latest Node.js and npm since they have a paid model, but I sure wish they would.

Thursday, April 7, 2016

OnStar vs iPhone

OnStar top tier pricing is rather expensive.  To get the whole kit and kaboodle, which is  Guidance, Security, and Protection, it costs $35, let me correct that, $34.99 because $35 sounds too expensive.

The bottom two plans are reasonable at $19 and $24, which to me has some value but not enough to pull the trigger.  The problem is what I want is the top tier, but since I have an iPhone with Google Maps, Yelp, and so much more, I just can't see the need to pull the trigger on the top plan either.  I also have an older Garmin which is still usable and for $349 bucks (the cost of year of OnStar Guidance Plan) I could get a really sweet upgrade to a new Garmin with lifetime maps and traffic, and have road visuals, Turn by Turn is mostly audio with a large icon showing the direction of turn.

I fully understand the call center cost model of agent/hour.  The problem is that a large portion of the the services of OnStar are fully automated or a section of what they do is, such as crash detection which brings an OnStar rep on line.  and while there's a whole other discussion on minimum wages or outsourcing (some consider slave wages), It's all about what people are willing to pay for, or choose to do without.

What I don't know the the average amount that people actually use OnStar.  During the first 6 months I had it free, I only used it a few times, mostly because I didn't really want to talk to someone for assistance.  I'm a guy, that's pretty much typical.   That lack of use is probably a good indication of usage stats of OnStar in general since it's a huge cash cow for GM.  I would also imagine the monthly charge just happens for a lot of people along with the cell phone bill, XM Satellite, Cable/Dish/Internet addon after addon until people suddenly wonder where all their money went.

I'll just stick to my iPhone and Garmin and limit some of extra charges.

Thursday, March 31, 2016

Ransomware and the Importance of Backing Up Your Data

When should you backup your computer?  Simple, when the data you have isn't replaceable or it's not cost/time effective to replace lost data.  With recent news of a hospital paying out ransomware, its a good time to think about backup.  Not just data, but recovery.

I tend to have multiple local backups as well as a cloud strategy.  For local, one of my methods is to have a bare metal backup, which is a complete disk image.  This provides the capability of a complete recovery to the state in time that the backup was made.    Most of the data is in the cloud, which provides recent information.  I only need to perform a bare metal every few months or when I install a major software package.    One of the tools I like to use is Active@ Disk Image.  

(This is not a paid endorsement, just sharing the love of a great product)