A Programming “20 Minute Challenge”, NodeJS, VS Code, Project Oxford

So I tried a “20 Minute” challenge on my macbookpro and entered hell. The Project Oxford API was not responding when I ran it.
Problem with my tool installation, cialis buy firewall, cialis sales them? Who knows?
So I dug into the installation logs and found a problem with a missing file from the installation of the dependencies for the project. Not saying this was the problem, but it had a big smell about it.
Tried to Full Stack Overflow my way out of it, but didn’t find much.
This challenge may work on a clean machine that isn’t used for daily hacking but my machine was not that machine.
I tried using my Windows 10 image but hit hurdles trying to follow their instructions.
So I was going to have to understand the problem. Back to the mac.
Cloned NodeJS/Node from Github to copy the supposed missing file to the place it was missing. I sensed a bigger issue in the configuration for the mac but I was too much a noob to Nodejs to know better.
That caused trouble:
npm install —save  in the project directory
? bobblegit:(master)?npm install --save gifencoder
bobble@0.0.0 /Users/mo/Dev/node/bobble
??? gifencoder@1.0.6
?  bobblegit:(master) ? npm install --save jimp      
> node-zlib-backport@0.11.15 install /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport
> node-gyp rebuild
  CXX(target) Release/obj.target/zlib/src/node_zlib.o
In file included from ../src/node_zlib.cc:32:
/Users/mo/.node-gyp/5.11.0/include/node/node_internals.h:6:10: fatal error: 'util-inl.h' file not found
#include "util-inl.h"
1 error generated.
make: *** [Release/obj.target/zlib/src/node_zlib.o] Error 1
gypERR!build error
gypERR!stack Error: `make` failed with exit code: 2
gypERR!stack    at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gypERR!stack    at emitTwo (events.js:100:13)
gypERR!stack    at ChildProcess.emit (events.js:185:7)
gypERR!stack    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gypERR!System Darwin 15.4.0
gypERR!command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gypERR!cwd /Users/mo/Dev/node/bobble/node_modules/node-zlib-backport
gypERR!node -v v5.11.0
gypERR!node-gyp -v v3.3.1
gypERR!not ok
npmWARNinstall:node-zlib-backport@0.11.15 node-zlib-backport@0.11.15 install: `node-gyp rebuild`
npmWARNinstall:node-zlib-backport@0.11.15 Exit status 1
bobble@0.0.0 /Users/mo/Dev/node/bobble
??? jimp@0.2.22

sudo didn’t help either.
Led to here:
This led to:
npmERR! node-zlib-backport@0.11.15 install: `node-gyp rebuild`
npmERR! Exit status 1
npmERR! Failed at the node-zlib-backport@0.11.15 install script 'node-gyp rebuild'.
npmERR! Make sure you have the latest version of node.js and npm installed.
npmERR! If you do, this is most likely a problem with the node-zlib-backport package,
npmERR! not with npm itself.
npmERR! Tell the author that this fails on your system:
npmERR!    node-gyp rebuild
npmERR! You can get information on how to open an issue for this project with:
npmERR!    npm bugs node-zlib-backport
npmERR! Or if that isn't available, you can get their info via:
npmERR!    npm owner ls node-zlib-backport
npmERR!There is likely additional logging output above.

Created a Node Azure machine hoping for better luck. Not so.
Tried on Azure Windows 10, got an InvalidImageSize error.
Tried on mac and parallels Windows 10, and got timeout.
Installed Node 6 on mac that was just released yesterday.
Redid installation of node, express, etc. on mac:
InvalidImageSize error on different images sizes and types.
“Image size is too small or too big.”
This was progress. Going from timeout to error is a big gain.
Apparently if I can send an http path instead of local image path, this bug won’t occur. Couldn’t get it to work without changing too much code for a 20 minute challenge. Put on the back burner.
Also, apparently if I put a .jpg on the end of the file that gets sent to Project Oxford, it will work. Not so.
I subscribed to two bug reports on github for the next move and am now waiting…
Apparently the problem was a regression issue where streaming no longer recognised the file type from the stream contents. Local file names without an extension that gave the game away with respect to the type of file now cause a problem. Not sure if that covers the problems I have experienced, though.
A pull request to fix the issue has been submitted. Stay tuned.

Moving old code to new platforms

We are starting a project to build a transpiler. I did it a long time ago (1996) when I converted some aspects of a young version of javascript into the English language and converted language phrase selections back into javascript. One can do it by brute force or with finesse. I did it by brute force at the time.

The new transpiler project is here:


IPSC 2015 Programming Competition

This programming competition is about to start:



If you have a mac and are finding it hard to install pygame for the competition, viagra usa purchase I think this will do it:

pip install hg+http://bitbucket.org/pygame/pygame

Unfortunately I installed a whole pile of stuff before this so I have no idea if any of it helped.

Let me know how you go.

Macbook Pro Repeated Boot Kernel Panic Scare

I was computing away on the train this morning, generic viagra buy viagra when suddenly I couldn’t use Evernote any more because of an invalid security certificate. This was not what it seemed, and sure enough Safari started showing a bunch of blank security certificates. I closed down the computer and restarted. And received a kernel panic about 10 seconds into the boot before it restarted continually.

tl;dr – Problem solved!

Thankfully that I had backed up on Time Machine the night before, I booted off the backup drive and went into the Disk Utility. I couldn’t repair the SSD because I couldn’t unmount it. The Unmount button didn’t work.  The computer wouldn’t boot into safe mode.

I rebooted from a Recovery DVD (although I could have done it the boot from the Time Machine too)

What unmounted it was selecting the disk in Disk Utility and selecting Info to get the name of the disk – for me it was disk0s2.

Closed Disk Utility and select Utilities >> Terminal

cd /
cd dev
umount -fv disk0s2

I could now run Repair Disk and Repair Permissions in Disk Utility.

I had no problems with the Repair Disk (phew!) but there were permissions that were unable to be repaired by Disk Utility and the computer still kernel panicked when I booted.

Rebooted with Time Machine to the Terminal, unmounted the hard disk as above, and tried to restore from Time Machine Backup.

The system failed to see the hard disk.

Erased the partition, and it gave me a formatter error.

Tried to restore again from the Time Machine for the hell of it.

It couldn’t erase the disk.

I took out the SSD, and loaded it in a USB slot with a cable, then booted from the Recovery DVD and erased and reformatted the SSD. Success.

(6 hours later)

It then restored successfully from the Time Machine backup.

Moral of the story? Have recent backups and a Recovery DVD around (but I think the SSD or its cable might be on its way out 🙂

update: problem recurred. Will try a new Sata cable as suggested in numerous places on the internet.

(several days later)

update: new cable did the trick.

The clue that it wasn’t the SSD drive was that it didn’t have any errors on it when I ran Repair Disk in the Disk Utility. Phew!

Recovering from a Broken WordPress Theme

If you assign your WordPress site to a theme that is broken, viagra usa physician it could make every page show white. If you have access to the files of your WordPress site, discount navigate to wp-content/themes/ and either delete or change the name of the directory that contains the theme you selected.

This will revert the WordPress site to the default theme and you will be able to start to work out what happened.