- goto the node website
- click download
- click the source download
- go to the directory you downloaded the source to
tar -xzvf <the node tar.gz you downloaded>
cd <node directory>
./configure --prefix=~/.node
make && make install
#!/usr/bin/env ruby | |
# merge_asana_into_omnifocus.rb | |
# Hilton Lipschitz | |
# http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# Script to import Asana projects and their tasks into | |
# OmniFocus and keep them up to date from Asana. |
for (var i = 0; i < 10; i++) { | |
setTimeout(function() { console.log("i is " + i); }, 1000) | |
} | |
console.log('done, i is: ' + i); |
//var reverse = require('../app/reverse'); | |
var pal = require('../app/pal'); | |
var expect = require('chai').expect; | |
describe('palindrome', function() { | |
it('it is a palindrome', function() { | |
expect(pal('racecar')).to.be.true; | |
}); | |
}); |
tar -xzvf <the node tar.gz you downloaded>
cd <node directory>
./configure --prefix=~/.node
make && make install
'use strict'; | |
var parenFinder = function (){ | |
var parens = []; | |
var expression = process.argv[2]; | |
var isOK = true; | |
for(var i = 0; i < expression.length; i++){ | |
if (expression[i] === '('){ | |
parens.push(i); | |
} | |
if (expression[i] === ')'){ |
(source "melpa" "http://melpa.milkbox.net/packages/") | |
(source "gnu" "http://elpa.gnu.org/packages/") | |
(source "marmalade" "http://marmalade-repo.org/packages/") | |
(depends-on "ac-js2") | |
(depends-on "adaptive-wrap") | |
(depends-on "ag") | |
(depends-on "auto-complete") | |
(depends-on "calfw") | |
(depends-on "cask") |
/******************** | |
* theLongWayOut.js * | |
******************** | |
* | |
* Well, it looks like they're on to us. The path isn't as | |
* clear as I thought it'd be. But no matter - four clever | |
* characters should be enough to erase all their tricks. | |
*/ | |
function startLevel(map) { |
/***************** | |
* cellBlockA.js * | |
***************** | |
* | |
* Good morning, Dr. Eval. | |
* | |
* It wasn't easy, but I've managed to get your computer down | |
* to you. This system might be unfamiliar, but the underlying | |
* code is still JavaScript. Just like we predicted. | |
* |
Node.js is the red-hot new hotness! You can't throw a stick on the internet without hitting someone talking about Node. But why? For one, it's built on JavaScript which is completely ubiquitous. So, why not build a development stack and server on JavaScript? I would argue that the installation is almost painless while the terseness of the language is not.
While you can create apps 100% from Node.js, the Express framework is a great tool that helps you solve many standard problems without having to write boilerplate code.
Node.js is here and it's not going anywhere anytime soon. So if you are new to Node.js, Express, and even JavaScript in general, this is a great newb's step-by-step guide to get started.
There are a handful of ways you can install Node into your system ranging from a pre-packaged installer to source. Somewhere in here you will find a way that works best for you.
var Point = function (xloc,yloc) { | |
var x = xloc; | |
var y = yloc; | |
var constructor = function(){ } | |
constructor.prototype.getX = function() { return x; } | |
constructor.prototype.getY = function() { return y; } | |
constructor.prototype.translate = function(xdelta,ydelta) { | |
x = x + xdelta; | |
y = y + ydelta; | |
} |