This file contains 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
/** | |
* Intercept.js | |
* Simple meta-programming for methods | |
* Copyright (c) 2014 marlun78 | |
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83 | |
* | |
* The intercept-function provides a pre and a post hook that | |
* will run before and after the original implementation | |
* respectively. In the pre-hook you have access to the | |
* arguments passed, and in the post-hook you have access to |
This file contains 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
// @mixin | |
// Loops over all items in the specified list and for each item executes | |
// a special `.\\` mixin declared by the specified ruleset. The ruleset | |
// and mixin combination is used to emulate a lambda function delegate. | |
// @param {List} list | |
// The list over which to loop. | |
// @param {Ruleset} lambda | |
// A ruleset that may define the `.\\` mixin that is used to process the | |
// individual list items. The mixin should correspond to the | |
// following signature: |
This file contains 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
.each(@list, @ruleset) { | |
@plugin "plugins/lambda"; | |
@length : length(@list); | |
._iterate(1); | |
._iterate(@index) when (@index =< @length) { | |
@item : extract(@list, @index); | |
@lambda : lambda(@item, @index, item index, @ruleset); | |
@lambda(); |
This file contains 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
/*! | |
* VERSION: 0.0.1 | |
* DATE: 2013-12-03 | |
* | |
* @description: Plugin to manipulate transform properties of SVGJS objects, heavily based on the RaphaelPlugin | |
* | |
* @author: Rob Aldred, raldred@gmail.com | |
*/ | |
(window._gsQueue || (window._gsQueue = [])).push( function() { |
This file contains 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
'use strict'; | |
const _ = require('lodash'); | |
module.exports = bookshelf => { | |
return bookshelf.Model.extend({ | |
hasTimestamps: true, | |
initialize() { | |
this.on('saving', this.beforeSave); |
This file contains 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
angular.module('services', []) | |
.factory('State', function ($rootScope) { | |
'use strict'; | |
var state; | |
var broadcast = function (state) { | |
$rootScope.$broadcast('State.Update', state); | |
}; | |
var update = function (newState) { |
This file contains 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(define){define(function(require,exports,module){ | |
//... | |
});})(typeof define=='function'&&define.amd?define | |
:(function(n,w){'use strict';return typeof module=='object'?function(c){ | |
c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){ | |
return w[n];},m.exports,m);w[n]=m.exports;};})('module-name',this)); |
This file contains 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
Options -Indexes | |
<IfModule !mod_rewrite.c> | |
Deny from all | |
</IfModule> | |
<IfModule mod_rewrite.c> |
This file contains 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
// Forked from: https://gist.github.com/melbourne2991/8822609 | |
// | |
// Below is an example of a directive that let's other directives know when there has been a change | |
// in a breakpoint, as well as a windows resize, the event is triggered on the window resize and | |
// broadcast on $rootScope. The arguments contain the current & previous breakpoints. Previous will | |
// be null if there is yet to be a change in breakpoint. | |
// | |
app.directive('bsBreakpoint', function($window, $rootScope, $timeout) { | |
return { | |
controller: function() { |
This file contains 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
/** | |
* @author RubaXa <trash@rubaxa.org> | |
* @license MIT | |
*/ | |
(function () { | |
"use strict"; | |
function _then(promise, method, callback) { | |
return function () { |
OlderNewer