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
.apple {} | |
.apple_headline { | |
//... | |
} | |
.apple_sub-head { | |
//... | |
} |
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 class="apple"> | |
<h2 class="headline">{{headline}}</h2> | |
<h3 class="sub-head">{{subhead}}</h3> | |
<div class="body">{{body}}</div> | |
</div> |
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
.apple h2 { | |
//... | |
} | |
.apple h3 { | |
//... | |
} | |
.apple section { | |
//... |
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
article,aside,details,figcaption,figure, footer,header,hgroup,menu,nav,section { | |
display:block; | |
} |
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 Foo = Backbone.Model.extend({ | |
/* some code here */ | |
}); | |
//Default sollection | |
Foo.Collection = Backbone.Collection.extend({ | |
model: Foo | |
/* some code here */ | |
}); |
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 async = require('async'); | |
var _ = require('underscore'); | |
var api = { | |
add: function(qry, callback) { | |
if (!qry || ! _.isNumber(qry.a) || ! _.isNumber(qry.b)) { | |
callback('Must specify two numeric params, a and b. Params were: '+JSON.stringify(qry), null); | |
} | |
else { | |
callback(null, qry.a + qry.b); |
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
wget https://bitbucket.org/denilsonsa/small_scripts/raw/9159fee62dc7cca7f81f47cef41bd9ae1324553e/sleep_until_modified.py | |
chmod u+x ./sleep_until_modified.py | |
touch testfile.old | |
touch testfile | |
#note limitation of this script: needs file to exist beforehand | |
while ./sleep_until_modified.py testfile || sleep 1; do echo "diff detected" $( date -u --rfc-3339=seconds ) ; diff testfile.old testfile ; cp testfile testfile.old ; done |
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 this method when we want to silence window alerts and console output within | |
* a test case. | |
* Most useful when testing error messages. | |
* | |
* Sample usage: | |
test("should not show any dialogs or output to console", function() { | |
this.silenceAlertsAndConsole(); | |
window.alert("Hello"); | |
console.log("World"); |
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 workaroundIosFixedPositionBug() { | |
var isIosSafari = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); | |
if (isIosSafari) { | |
// workaround for bug in iOS5+ where `position: fixed;` behaves incorrectly when virtual keyboard is opened | |
// Solution somewhat similar to: http://stackoverflow.com/a/15537846/194982 | |
// Presently simply hides/ shows anything with class 'myFixed' (e.g. a header bar), but may be modified to do | |
// fancier things like repositioning it manually with javascript, should that be a requirement | |
$('#main').on("focus", "input, textarea", function() { | |
$('.myFixed').css('display', 'none'); | |
}); |
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
diff --git a/ngyo/Gruntfile.js b/ngyo/Gruntfile.js | |
index 3df3112..2cb746a 100644 | |
--- a/ngyo/Gruntfile.js | |
+++ b/ngyo/Gruntfile.js | |
@@ -1,6 +1,8 @@ | |
// Generated on 2014-02-13 using generator-angular 0.7.1 | |
'use strict'; | |
+var path = require('path'); | |
+ |
OlderNewer