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
╰─$ mocha allTests.js --reporter spec --framework=angularjs 26 ↵ | |
TodoMVC - angularjs | |
No Todos | |
✓ should hide #main and #footer (93ms) | |
New Todo | |
1) should allow me to add todo items | |
2) should clear text input field when an item is added | |
3) should append new items to the bottom of the list |
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
.button | |
{ | |
display: inline-block; | |
white-space: nowrap; | |
background-color: #ccc; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc)); | |
background-image: -webkit-linear-gradient(top, #eee, #ccc); | |
background-image: -moz-linear-gradient(top, #eee, #ccc); | |
background-image: -ms-linear-gradient(top, #eee, #ccc); | |
background-image: -o-linear-gradient(top, #eee, #ccc); |
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 HashMap = function(){ | |
var uuid = function(a,b){for(b=a='';a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):'-');return b;} | |
var getKey = function(target) { | |
if (!target) return; | |
if (typeof target !== 'object') return target; | |
return target.hashkey ? target.hashkey : target.hashkey = uuid(); | |
} | |
return { | |
put: function(key, value) { | |
this[getKey(key)] = value; |
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
.square { | |
width: 100px; | |
height: 100px; | |
background: red; | |
margin: 5px; | |
} | |
.animated { | |
-webkit-animation-fill-mode: both; | |
-moz-animation-fill-mode: both; |
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
.square { | |
width: 100px; | |
height: 100px; | |
background: red; | |
margin: 5px; | |
} | |
.animated { | |
-webkit-animation-fill-mode: both; | |
-moz-animation-fill-mode: both; |
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
div { | |
background-color: #ccc; | |
margin: 20px; | |
width: 50px; | |
height: 50px; | |
-webkit-animation-duration: 1s; | |
-webkit-animation-timing-function: ease-out; | |
} |
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
{ | |
"name": "Project name", | |
"version": "0.0.0", | |
"author": "Author name", | |
"scripts": { | |
"preinstall": "which -s grunt && grunt --version | grep grunt-cli > /dev/null 2>&1; if [[ \"$?\" != 0 ]]; then npm install grunt-cli -g; exit 0; fi" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// Code goes here | |
window.widgets = window.widgets || {}; | |
window.widgets.coupons9 = window.widgets.coupon9 || {}; | |
(function(ns, soma) { | |
'use strict'; | |
var CouponsMediator = function(target, dispatcher, dataService, couponsTemplate) { |
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 Node = function(data, next) { | |
this.data = data; | |
this.next = next; | |
}; | |
var node1 = new Node('id1', | |
new Node('id2', | |
new Node('id3', | |
new Node('id4') | |
) |
OlderNewer