Skip to content

Instantly share code, notes, and snippets.

View wejendorp's full-sized avatar

Jacob Wejendorp wejendorp

View GitHub Profile
@wejendorp
wejendorp / App.js
Created April 21, 2017 08:03
Codher mini todo
// Live coding results from Codher at Tradeshift
// 2017-04-20
//
// Usage:
// create-react-app codher
// cd codher
// paste this file to src/App.js
// npm start
//

Keybase proof

I hereby claim:

  • I am wejendorp on github.
  • I am wejendorp (https://keybase.io/wejendorp) on keybase.
  • I have a public key whose fingerprint is 11E7 673B 7CBD BA7E F695 F5D4 41A3 CA3F EA79 584B

To claim this, I am signing this object:

angular.module('myApp').config(function($provide) {
$provide.decorator('$q', function($delegate) {
// Extend promises with non-returning handlers
function decoratePromise(promise) {
promise._then = promise.then;
promise.then = function(thenFn, errFn, notifyFn) {
var p = promise._then(thenFn, errFn, notifyFn);
return decoratePromise(p);
};
@wejendorp
wejendorp / tagsinput.js
Created January 2, 2014 10:35
Angular bootstrap tags via modelController
angular.module('bootstrap-tagsinput', [])
.directive('tagsinput', [function() {
function getItemProperty(scope, property) {
if (!property)
return undefined;
if (angular.isFunction(scope.$parent[property]))
return scope.$parent[property];