Friday, April 18, 2014

Shortcut Top/Bottom of Page in Chrome for MacOSX

Top of Page
FN + LEFT arrow 
or CMD + UP arrow

Bottom of Page
FN + RIGHT arrow 
or CMD + DOWN arrow

SPECIFIC TO 
Chrome Web Browser on MacBook OSX
Small Keyboard without right Number Keypad
REFERENCES

Wednesday, April 16, 2014

Google Maps Autocomplete

GOAL
As a user types in an address, Google Maps attempts to auto-complete so the user can see all locations in the world that match the entered address.  It ultimately saves the user time so they only have to enter the start of the address.

CODE
All JavaScript & HTML in one file here:
https://gist.github.com/joshwentz/10904677

DEMO
http://codepen.io/joshwentz/pen/mLyrh


IMPLEMENTATION
Live Web App:  http://node.eebhub.org
Code here

REFERENCE
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete


Thursday, April 10, 2014

Fix "Cannot find module OpenStudio" for Node.js Bindings on Ubuntu Linux

ERROR: Cannot find module 'OpenStudio'



PROBLEM: Your JavaScript cannot find where the OpenStudio software libraries are.  



SOLUTION

1. Login as user & add to $PATH
export NODE_PATH=/usr/local/lib/openstudio/node
PATH=$PATH:/usr/local/lib/openstudio/node
sudo -s 
sudo echo 'export NODE_PATH=/usr/local/lib/openstudio/node' >> /etc/profile 
sudo echo 'export PATH=$PATH:$NODE_PATH' >> /etc/profile
2. Login as root & add to $PATH
sudo -i 
sudo echo 'export NODE_PATH=/usr/local/lib/openstudio/node' >> /etc/environment
sudo echo 'export PATH=$PATH:$NODE_PATH' >> /etc/environment

TEST
echo $PATH
echo $NODE_PATH

/usr/local/lib/openstudio/node must show up

POST SPECIFIC TO : Linux Ubuntu 12.04
REFERENCE
Jason Turner, Empty Crate
http://askubuntu.com/questions/128413/setting-the-path-so-it-applies-to-all-users-including-root-sudo

FULL ERROR
module.js:340
    throw err;
          ^
Error: Cannot find module 'OpenStudio'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object. (/home/ubuntu/energyplus.io-live/routes/openstudio-run.js:2:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)