Skip to content

Instantly share code, notes, and snippets.

View JBreit's full-sized avatar

Jason Breitigan JBreit

  • Inner Mind Co.
  • Lancaster, PA
View GitHub Profile
@JBreit
JBreit / node-curry.js
Created April 1, 2016 17:22 — forked from fernandezpablo85/node-curry.js
Explanation of the curry function for node.js
function curriedReadFile(path) {
var _done, _error, _result;
var callback = function(error, result) {
_done = true,
_error = error,
_result = result;
};
fs.readFile(path, function(e, r) {
@JBreit
JBreit / Simple ES6 Todo.markdown
Created March 14, 2016 21:01
Simple ES6 Todo
@JBreit
JBreit / ES6 - Scrollable Datagrid.markdown
Created March 14, 2016 20:38
ES6 - Scrollable Datagrid

ES6 - Scrollable Datagrid

Pen exploring several topics: (1) How to build a scrollable, bootstrap style data grid; (2) How to virtualize the requisite components (2) using ES6 classes; (3) How to handle AJAX using an ES6 promise (instead of jQuery); and (4) How to make each class testable (or compatible with) using jsTestDriver.

Forked from brady house's Pen ES6 - Scrollable Datagrid.

A Pen by JBreit on CodePen.

License.

export default class Application {
constructor(container) {
this[container] = container;
}
init() {
define([
'jquery'
],
function (requirejs) {
'use strict';
var $ = requirejs('jquery'),
lib = requirejs('lib'),
controller = requirejs('UserController'),
define(function () {
'use strict';
function BaseController(id) {
this.id = id;
}
BaseController.prototype = {
define(function () {
'use strict';
function BaseModel(title) {
this.title = title;
}
BaseModel.prototype = {
var Storage = (function (name) {
if (supportLocalStorage) {
var self = window['localStorage'];
if (!localStorage[name]) {
localStorage.ApplicationStorage = localStorage[name];
localStorage.ApplicationStorage.users = localStorage.setItem('ApplicationStorage', 'Users');