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
function flattenArray(final, main, i) { | |
if(main[i] instanceof Array) { | |
flattenArray(final, main[i], 0) | |
} else { | |
flatArray.push(main[i]); | |
} | |
if(main.length !== (i + 1)) { | |
flattenArray(final, main, (i + 1)) | |
} | |
} |
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
##Shoot the terminal- | |
##For mac users who **don't** have `wget` installed | |
##Run | |
##To install homebrew - | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
##To install wget - |
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
##Using npm with meteor | |
#Install meteroite | |
npm install -g meteorite | |
#Install npm smart package from atmosphere, | |
mrt add npm | |
#npm is a node.js package manager. |
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
npm install meteor | |
meteor update | |
#Meteorite is a meteor version manager and package manager .Find it here -https://github.com/oortcloud/meteorite | |
meteor create myfirstapp | |
cd myfirstapp | |
meteor |
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
collection = new Meteor.Collection('collection'); | |
if (Meteor.isClient) { | |
Template.hello.greeting = function () { | |
return "Welcome to testapp."; | |
}; | |
Template.hello.events({ | |
'click input' : function () { | |
// template data, if any, is available in 'this' | |
if (typeof console !== 'undefined') |
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
<head> | |
<title>testapp</title> | |
</head> | |
<body> | |
{{> hello}} | |
</body> | |
<template name="hello"> | |
<h1>Hello World!</h1> |