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
//LESS.JS MIXINS | |
.border-radius(@radius) { | |
border-radius: @radius; | |
-webkit-border-radius: @radius; | |
-moz-border-radius: @radius; | |
-o-border-radius: @radius; | |
} | |
.box-shadow(@shadow) { | |
box-shadow: @shadow; |
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 data = []; | |
var t1; | |
var win = Ti.UI.createWindow({ | |
width: Ti.UI.FILL, | |
height: Ti.UI.FILL, | |
backgroundColor: '#ffffff' | |
}); | |
var tableView = Ti.UI.createTableView({ |
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
/** | |
* Test #1 | |
* Adding 10,000 Ti.UI.TableViewRows to a Ti.UI.TableView | |
* The rows have the Ti.UI.iPhone.TableViewCellSelectionStyle.BLUE constant in them | |
* | |
* Total time in my Mac: 1228ms | |
*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#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
imageWin = Ti.UI.createWindow({ | |
width: Ti.UI.FILL, | |
height: Ti.UI.FILL, | |
backgroundColor:'#99000000', | |
opacity: 0 | |
}); | |
var scrollView = Ti.UI.createScrollView({ | |
contentWidth: '100%', | |
contentHeight: Ti.UI.SIZE, |
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 adapted from https://gist.github.com/2163005 | |
var s3 = { | |
access_key_id: "<Access Key>" | |
, secret_key: "<Secret Key>" | |
, bucket: "<bucket name>" | |
, acl: "public-read" | |
, https: "false" | |
, error_message: "" | |
, pad: function(n) { |
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
// Fairly safe way to visually hide content, but make it accessible to screen readers | |
.visually-hidden { | |
position: absolute; | |
left: -9999px; | |
height: 1px; | |
} | |
@media screen and (max-width: 700px) { | |
// Again, accessible to screen readers | |
// Example: <a href="/login" class="icon icon-twitter"><span class="mobile-offscreen">Single-click </span> log in with Twitter</a> |
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
{"photos":{"page":1, "pages":1, "perpage":80, "total":"48", "photo":[]}, "stat":"ok"} | |
//FACEPALM. What am I supposed to do with that. |
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 express = require('express'); | |
var app = express(), | |
log; | |
app.configure('development', function() { | |
app.use(express.errorHandler()); | |
log = { | |
info:function(e) { | |
console.log(e); | |
} |
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 logStream = { | |
write: function(message,encoding) { | |
log.info(message.replace('\n', '')); | |
} | |
}; | |
//Application's configuration | |
app.configure(function() { | |
//Your base config methods | |
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
/*Grid*/ | |
.cover() { | |
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.myBackground.jpg', sizingMethod='scale'); | |
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myBackground.jpg', sizingMethod='scale')"; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
OlderNewer