This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require the core node modules. | |
var chalk = require( "chalk" ); | |
// ----------------------------------------------------------------------------------- // | |
// ----------------------------------------------------------------------------------- // | |
// I am a mock zEmbed class. | |
// -- | |
// NOTE: With a traditional "class", all of the internal references use "this" because | |
// the methods are all located on the class prototype and do not have a lexical binding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My thoughts on writing tiny reusable modules that each do just one | |
thing. These notes were adapted from an email I recently sent. | |
*** | |
If some component is reusable enough to be a module then the | |
maintenance gains are really worth the overhead of making a new | |
project with separate tests and docs. Splitting out a reusable | |
component might take 5 or 10 minutes to set up all the package | |
overhead but it's much easier to test and document a piece that is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prerequisites: | |
sudo apt-get install g++ make libssl-dev git-core pkg-config | |
# pkg-config: is needed so that configure will be able to verify that openssl is | |
# installed. | |
# curl: is handy, but not needed for node.js to work. | |
# Install into user-specific local bin: | |
mkdir ~/local | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc |