Skip to content

Instantly share code, notes, and snippets.

View scottcorgan's full-sized avatar
💭
Not coding

Scott Corgan scottcorgan

💭
Not coding
  • Tamarack
  • Shelbyville, KY
View GitHub Profile
@scottcorgan
scottcorgan / my_vue_component.coffee
Created January 23, 2017 17:36 — forked from benoitongit/my_vue_component.coffee
Make Vue.js works with Ruby on Rails and Turbolinks 5
@MyComponent =
props: ['myProp']
template: '<div>A custom component with {{myProp}}</div>'
@scottcorgan
scottcorgan / redux-devtools-separate-window.js
Last active August 29, 2015 14:27 — forked from tlrobinson/redux-devtools-separate-window.js
Put the awesome redux-devtools in it's own window so it doesn't obscure or be obscured by your application
// 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 >
@scottcorgan
scottcorgan / QWrapper.js
Created December 18, 2012 20:07 — forked from anonymous/QWrapper.js
Function wrapper to avoid creating a new deferred in every function using the Q (http://documentup.com/kriskowal/q) library.
/*
Function wrapper to avoid creating a new deferred in every function
using the Q (http://documentup.com/kriskowal/q) library.
*/
// Wrapper Function
function _q (callback) {
return function () {
var deferred = Q.defer(),
args = [].slice.call(arguments, 0);