I've collected all the links related to Backbone.js that I find useful. Most of these are well-built projects and epic guides (not ephemeral blog posts.) Please feel free to fork and even contribute.
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
const sequence = require('run-sequence') | |
// create a middleware stack | |
// (obj, obj, [fn(obj, obj, fn)], fn) -> null | |
function mw (req, res, arr, done) { | |
const fns = arr.map(fn => (next) => fn(req, res, next)) | |
sequence(fns, 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
--- | |
- hosts: all | |
gather_facts: false | |
remote_user: ubuntu | |
sudo: yes | |
vars: | |
http_port: 80 | |
api_root: /var/www/ansibletest.com/ | |
tasks: | |
- name: update apt |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// An example of how to use the PhoneGap / Cordova plugin described in this post [[ http://blog.evantahler.com/phonegap-and-push-notifications ]] to get an iOs device token | |
document.addEventListener("deviceready", function(){ | |
getDeviceToken(); | |
} | |
getDeviceToken = function(){ | |
if(typeof device != "undefined" && typeof cordova == "object"){ | |
var getToken = function(types, success, fail){ | |
cordova.exec(success, fail, "PushToken", "getToken", types); |
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 strict'; | |
var balanceModule = (function(){ | |
// Private variable | |
var balance = 0; | |
// Private functions | |
function logStatus(updateFigure, currentBalance, operatorSymbol, newBalanceFigure){ | |
console.log(currentBalance + ' ' + operatorSymbol + ' ' + updateFigure + ' = ' + newBalanceFigure); | |
} |
Note: this rough draft has turned into https://github.com/maxogden/art-of-node#art-of-node
go to https://github.com/maxogden/art-of-node#art-of-node to view the newer versions of this document
<div style="text-align: center;">
<div class="inline-block">Element</div>
<div class="inline-block">Element</div>
<div class="inline-block">Element</div>
</div>
.inline-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
function params(fn) { | |
var str = fn.toString(); | |
var sig = str.match(/\(([^)]*)\)/)[1]; | |
if (!sig) return []; | |
return sig.split(', '); | |
} | |
console.api = function(obj){ | |
console.log(); | |
var proto = Object.getPrototypeOf(obj); |
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
// Pre-requisites: | |
// 1. Device core plugin | |
// 2. Splashscreen core plugin (3.1.0) | |
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" /> | |
// 4. config.xml: <preference name="DisallowOverscroll" value="true" /> | |
function onDeviceReady() { | |
if (parseFloat(window.device.version) >= 7.0) { | |
document.body.style.marginTop = "20px"; | |
// OR do whatever layout you need here, to expand a navigation bar etc |
OlderNewer