Skip to content

Instantly share code, notes, and snippets.

View alanrubin's full-sized avatar

Alan Rubin alanrubin

  • The Rubin Way
  • Israel & UK
View GitHub Profile
@alanrubin
alanrubin / find-dependencies.js
Last active August 29, 2015 14:16
Fixes for proxyquireify
'use strict';
var detective = require('detective');
function simpleRequire(n) {
// var proxy = require('proxyquireify')
return n.parent
&& n.parent.id
&& n.parent.id.name;
}
@alanrubin
alanrubin / gulpfile.js
Last active August 29, 2015 14:16
Jest (gulp-jest) + React + React Router Testing files
/** .... **/
var $ = require("gulp-load-plugins")();
var gulp = require("gulp");
function handleError(task) {
return function(err) {
$.util.log($.util.colors.red(err));
$.notify.onError(task + " failed, check the logs..")(err);
};
@alanrubin
alanrubin / Links.md
Last active December 12, 2015 00:09
Cloud Portal Links
@alanrubin
alanrubin / MANIFEST.MF
Last active December 11, 2015 15:58
Spring MVC with thymeleaf (http://www.thymeleaf.org/) templates in SAP NW Cloud error. Complete war can be downloaded at http://www.therubinway.com/web.war
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Matrix
Bundle-SymbolicName: Matrix
Bundle-Version: 1.0.0.qualifier
Bundle-Classpath: .,WEB-INF/classes,WEB-INF/lib/thymeleaf-2.0.15.jar,WEB-INF/lib/thymeleaf-spring3-2.0.15.jar
Web-ContextPath: /web123
Import-Package: javax.servlet,javax.servlet.http,javax.servlet.resources,javax.swing.tree,
javax.naming,org.w3c.dom,org.apache.commons.logging,javax.xml.parsers;resolution:=optional,
org.xml.sax;resolution:=optional,org.xml.sax.helpers;resolution:=optional
@alanrubin
alanrubin / gist:4548113
Created January 16, 2013 15:46
Extending backbone-pageable with methods similar to backbone.paginator - filtering, sorting. Also changing some of the behaviour to avoid errors.
define(['underscore', 'backbone', 'config', 'backbone-pageable'], function(_, Backbone, Config, PageableCollection) {
var extendedPageableCollection = PageableCollection.extend({
state: {
pageSize: Config.itemsPerPage
},
mode: 'client',
full: true,
/**
* Set sort configuration and execute the sort for the full collection
**/