This file contains hidden or 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
// give it a name so it reuses the same window | |
var win = window.open(null, "redux-devtools", "menubar=no,location=no,resizable=yes,scrollbars=no,status=no"); | |
// reload in case it's reusing the same window with the old content | |
win.location.reload(); | |
// wait a little bit for it to reload, then render | |
setTimeout(function() { | |
React.render( | |
<DebugPanel top right bottom left > |
This file contains hidden or 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 livereload = require('gulp-livereload'), | |
superstatic = require('superstatic'), | |
dest = 'build'; | |
gulp.task('server', function(next) { | |
var server = superstatic(); | |
next(); | |
}); | |
gulp.task('watch', ['server'], function() { |
This file contains hidden or 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 constructor(spec) { | |
let { member } = spec, | |
{ other } = other_constructor(spec), | |
method = function() { | |
// member, other, methid, spec | |
}; | |
return Object.freeze({ | |
method, | |
other |
This file contains hidden or 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-element></my-element> |
This file contains hidden or 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-element></my-element> |
This file contains hidden or 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
// Server | |
var express = require('express'); | |
var app = express(); | |
var apiV1 = require('api-v1'); | |
app.user('/api/v1', apiV1.app); | |
app.user('/api/v2', apiV2.app); | |
app.listen(process.env.PORT || 9876); |
This file contains hidden or 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
// inside a function on the Divshot prototype | |
// it uses https://www.npmjs.org/package/promise under the hood | |
var promise = this.http._promiseWrap(function (resolve, reject) { | |
// resolve or reject in here | |
}); | |
This file contains hidden or 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 bind = function (selector, event) { | |
return binder(selector, event); | |
}; | |
var binder = function (selector, event) { | |
var listeners = []; | |
document.querySelector(selector) | |
.addEventListener(event, function (e) { | |
listeners.forEach(function (listener) { |
This file contains hidden or 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
at=error code=H18 desc="Request Interrupted" method=PUT path=/builds/3ff67c20247307921a1582ac6277bc0b546255c19780ab31404eb63fdc218d97/tar.gz host=loadpoint.divshot.com fwd="76.94.26.13" dyno=web.2 connect=1ms service=17813ms status=503 bytes=643535 sock=backend |
This file contains hidden or 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 fasten = Fasten.connect('your/fasten/hook/path', 'some_crazy_long_token_from_fasten'); | |
fasten.hook(function (data) { | |
// Do amazing stuff here! | |
}); |