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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
{ | |
"// my options for SublimeLinter " : "//", | |
"jshint_options" : { | |
"boss": true, | |
"browser": true, | |
"curly": false, | |
"devel": true, | |
"eqeqeq": false, | |
"eqnull": true, |
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
// Make sure the socket is coming from our app by matching the session id | |
socketServer.set('authorization', function (data, accept) { | |
cookieParser(data, {}, function(err) { | |
if (err) { | |
accept(err, false); | |
} else { | |
config.sessionStore.load(data.signedCookies[config.sessionKey], function(err, session) { | |
if (err || !session) { | |
accept('Session error', false); | |
} else { |
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 os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |
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
/* | |
* Writing Unit Tests to learn code or a library has been a fantastic strategy for me. | |
* I wrote these Jasmine Tests to enforce some of the very powerful concepts from | |
* https://github.com/rwldrn/idiomatic.js?utm_source=javascriptweekly&utm_medium=email. | |
*/ | |
describe("JavaScript Idiomatics", function() { | |
describe("Coercion", function() { | |
it("coerces string into number", 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
<div class="genesis-display"> | |
<div class="genesis-screen"> | |
<div class="genesis-inner"> | |
<span class="headline">Genesis 2.0</span> | |
<span class="tagline">HTML5 and Mobile Responsive</span> | |
</div> | |
</div> | |
<div class="genesis-stand"></div> | |
<div class="genesis-platform"></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
/* Row and Column defaults */ | |
.row { margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; width: 100%; } | |
.row .row.collapse { margin-left: 0; margin-right: 0; max-width: none; width: auto; } | |
.row .row { margin-left: -0.9375em; margin-right: -0.9375em; max-width: none; width: auto; } | |
.row.collapse .column, .row.collapse .columns { padding-left: 0; padding-right: 0; float: left; } | |
.column, .columns { padding-left: 0.9375em; padding-right: 0.9375em; width: 100%; float: left; position: relative; } | |
/* Up to 640px */ | |
@media only screen { | |
.small-1 { width: 8.33333% } |
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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
request = require 'request' | |
facebook = require 'fb' | |
get_fb_data = (req, res, next) -> | |
fb_req = 'https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECCRET&grant_type=client_credentials' | |
request.get fb_req, (err, res, body) -> | |
if err then console.log err |
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() { | |
_.extend(Backbone.Router.prototype, Backbone.Events, { | |
before: function(){}, | |
after : function(){}, | |
route : function(route, name, callback) { | |
Backbone.history || (Backbone.history = new Backbone.History); | |
if (!_.isRegExp(route)) route = this._routeToRegExp(route); | |
Backbone.history.route(route, _.bind(function(fragment) { | |
var args = this._extractParameters(route, fragment); | |
if( _(this.before).isFunction() ){ |
OlderNewer