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
#Trying to figure out how to get protractor working | |
# My first test is simple. Visit the page and see if this thing is on the page | |
# That test works fine. | |
# The second test is clicking a button and waiting to see if errors appear | |
# No matter what I try that I find on the net I can't get it to work. Help? | |
beforeEach -> | |
# the following command allows us to | |
# use protractor with our non-angular application |
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
.run(function($rootScope) { | |
$rootScope.$on('$viewContentLoaded', function () { | |
$(document).foundation(); | |
}); | |
}); |
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 allBlogs = function(cb){ | |
Blog.find({}, function(err, docs){ | |
if(err){ | |
cb(err, null); | |
} | |
else{ | |
cb(null, docs); | |
} | |
}); | |
}; |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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 myModule = (function($, undefined){ | |
var myVar1 = '', | |
myVar2 = ''; | |
var someFunction = function(){ | |
return myVar1 + " " + myVar2; | |
}; | |
return { | |
getMyVar1: function() { return myVar1; }, //myVar1 public getter |
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 MODULE = (function () { | |
var my = {}, | |
privateVariable = 1; | |
function privateMethod() { | |
// ... | |
} | |
my.moduleProperty = 1; | |
my.moduleMethod = function () { |
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
@ConversationClone.module "FooterApp.Show", (Show, App, Backbone, Marionette, $, _) -> | |
Show.Controller = | |
showFooter: -> | |
footerView = @getFooterView | |
getFooterView: -> | |
new Show.Footer |
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
a = ["A", "B", "C", "B", "A"] | |
a.detect{ |e| a.count(e) > 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
firstname = "fatArrow other person" | |
bill = | |
firstname: 'skinnyArrow Bill' | |
lastname: 'williams' | |
skinnyArrow: -> console.log @firstname | |
fatArrow: => console.log @firstname | |
bill.skinnyArrow() #bound to the object in which it's called. hence it returns the firstname property of the "bill" object |
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
coffee -c -w -o ../js application.coffee |
NewerOlder