A simple bubble loader.
Forked from Fitz's Pen Bubble loader.
A Pen by Nick Nance on CodePen.
// package/lib is a dependency we require | |
var lib = require('package/lib'); | |
// some behaviour for our module | |
function foo(){ | |
lib.log('hello world!'); | |
} | |
// export (expose) foo to other modules | |
exports.foo = foo; |
define(function ( require ) { | |
var isReady = false, foobar; | |
// note the inline require within our module definition | |
require(['foo', 'bar'], function (foo, bar) { | |
isReady = true; | |
foobar = foo() + bar(); | |
}); | |
// we can still return a module | |
return { | |
isReady: isReady, |
define(optionalId, ['underscore', 'backbone'], function (_, Backbone) { | |
// Return a defined module | |
return function () {}; | |
}); |
A simple bubble loader.
Forked from Fitz's Pen Bubble loader.
A Pen by Nick Nance on CodePen.
Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH | |
Create a config file in ~/.ssh/ | |
vim config: | |
# PERSONAL ACCOUNT Github | |
Host github.com-COOL | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa_COOL |
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserify = require('gulp-browserify'), | |
concat = require('gulp-concat'), | |
embedlr = require('gulp-embedlr'), | |
refresh = require('gulp-livereload'), | |
lrserver = require('tiny-lr')(), | |
express = require('express'), | |
livereload = require('connect-livereload') | |
livereloadport = 35729, |
var connect = require('connect'); | |
var serveStatic = require('serve-static'); | |
connect().use(serveStatic(__dirname)).listen(8080); |
define(function (require) { | |
"use strict"; | |
var Backbone = require('backbone'); | |
return Backbone.Model.extend({ | |
initialize: function() { | |
this.backboneSync = Backbone.sync; | |
}, |
define([ | |
'underscore', | |
'backbone', | |
'backbone.localstorage', | |
], function (_, Backbone, BBLocalStorage) { | |
'use strict'; | |
var SessionModel = Backbone.Model.extend({ | |
defaults: { | |
signedIn: false |
define([], function () { | |
'use strict'; | |
var AppSettings = { | |
baseUrl: "http://myapp.appspot.com", | |
modelType: "common/models/jsonp/event" | |
}; | |
return AppSettings; | |
}); |