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
var doors = []; | |
var temp; | |
//NO SWITCH | |
var firstGuess; | |
var doorOpen; | |
var noSwtichcorrect=0; | |
var noSwitchwrong=0; | |
function placeCar(){ |
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
//if begins with a vowel, add 'ay' to the end | |
//consonant sounds, move it to the end and add 'ay' | |
function translate(str){ | |
var strArr = str.split(" "); | |
var result = []; | |
strArr.forEach(function(word){ | |
var wordArr = word.split(""); | |
console.log(wordArr); | |
var shiftToEnd = ''; |
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
var traverseDomAndCollectElements = function(matchFunc, startEl) { | |
var resultSet = []; | |
if (typeof startEl === "undefined") { | |
startEl = document.body; | |
} | |
// your code here | |
// traverse the DOM tree and collect matching elements in resultSet | |
// use matchFunc to identify matching elements |
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
//store each word as object key, and property count | |
//this allows for quick lookup and counting | |
var words = function(str){ | |
var strArr = str.split(" "); | |
var objCount = {}; | |
strArr.forEach(function(word){ | |
if(objCount[word]){ | |
objCount[word] += 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
#Place file named as 'dir.sh' on main directory and run bash dir.sh | |
#ensure to include 'dir.sh' with .gitignore | |
# Create Folders | |
mkdir -p app/{models,routes} | |
mkdir -p config | |
mkdir -p config/api | |
mkdir -p public/{css,js/{controllers,directives,services,templates,factories},img,views} | |
mkdir -p server | |
mkdir -p server/models |
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
dir.sh | |
node_modules | |
bower_components | |
config |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var bluebird = require('bluebird'); | |
bluebird.promisifyAll(request); | |
var promise = request.getAsync('http://www.reddit.com'); | |
promise.get(1).then(function (htmlbody) { | |
var $ = cheerio.load(htmlbody); |
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
/** | |
* Created by ram on 15-05-03. | |
*/ | |
var gulp = require('gulp'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
var reactify = require('reactify'); | |
var browserify = require('browserify')(); | |
var gutil = require('gulp-util'); | |
var filter = require('gulp-filter'); |
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
test123 |
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
/** | |
* Created by ram on 15-05-03. | |
*/ | |
var gulp = require('gulp'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); | |
var reactify = require('reactify'); | |
var browserify = require('browserify'); | |
var gutil = require('gulp-util'); | |
var filter = require('gulp-filter'); |
OlderNewer