Skip to content

Instantly share code, notes, and snippets.

View developeron29's full-sized avatar

Ayush Narula developeron29

View GitHub Profile
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))
}
}
##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 -
##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.
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
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')
<head>
<title>testapp</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>