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 fs = require('fs'), | |
path = require('path'), | |
Promise = require('rsvp').Promise, | |
request = require('request'), | |
files = [ | |
'https://www.google.com/images/srpr/logo11w.png', | |
'http://rack.1.mshcdn.com/media/ZgkyMDEzLzA5LzE2L2JjL0Jpbmdsb2dvb3JhLmFkYjJkLnBuZwpwCXRodW1iCTEyMDB4OTYwMD4/996d9598/35b/Bing-logo-orange-RGB.png', | |
'http://assets.fontsinuse.com/static/use-media-items/15/14246/full-2048x768/52c4c6bc/Yahoo_Logo.png' |
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
/* | |
* usage: | |
* var Bus = require('../utils/bus'); | |
* var bus = new Bus({ url: 'amqp://guest:guest@localhost:5672' }); | |
* bus.connect(); // or bus.connectWithRetry(); | |
* | |
* bus.createQueueIfNotExists('queueName', function (err) { | |
* if (err) return console.log('error creating queue', err); | |
* console.log('queue created successfully'); | |
* }); |
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 gulp = require('gulp'), | |
tap = require('gulp-tap'); | |
gulp.src('bower_components/*') | |
.pipe(tap(function (file, t) { | |
var main = require(file.path + '/' + 'bower.json').main | |
console.log(file.path + '/' + main); | |
})); |
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
{ | |
"name": "a", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"postinstall": "./node_modules/bower/bin/bower install" | |
}, | |
"author": "", |
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
</html> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> |
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 Hapi = require('hapi'), | |
server = Hapi.createServer(parseInt(process.env.PORT || 3000), { files: { relativeTo: __dirname } }), | |
gulp = require('gulp'), | |
uglify = require('gulp-uglify'), | |
jshint = require('gulp-jshint'), | |
browserify = require('gulp-browserify'); | |
gulp.task('scripts', function () { | |
gulp.src(['client/app.js']) |
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
/** @jsx React.DOM */ | |
// http://jsfiddle.net/prabir/x2VX7/5/ | |
var ReactBindTo = { | |
bindTo: function (key, defaultValue) { | |
var self = this; | |
return { | |
value: this.state[key] || defaultValue, | |
requestChange: function (value) { |
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 (isNode) { | |
var public = {}; | |
if (isNode) { | |
module.exports = public; | |
} else { | |
window.public = public; | |
} | |