Inventory of solutions to modularize grunt configuration for large project & (legacy) codebases
- https://gist.github.com/Integralist/7463783
- see the oncletom's response below
Marionette.Region.prototype.replace = (view, speed) -> | |
speed = speed || 150 | |
if ! @currentView | |
@show(view) | |
return | |
@ensureEl() | |
isViewClosed = view.isClosed || _.isUndefined view.$el | |
isDifferentView = view isnt @currentView | |
view.render() |
Inventory of solutions to modularize grunt configuration for large project & (legacy) codebases
https://github.com/djvirgen/virgen-acl Simple and elegant, create your own checks. No middleware?
https://github.com/OptimalBits/node_acl Use as middleware, create your own roles and access. Great choice.
https://github.com/tschaub/authorized Similar to connect roles... but a bit more robust? you can create roles and action, and associate many roles with that action
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
(function (Backbone) { | |
var _old = Backbone.Model; | |
// Take a Backbone.Model and introduce a proper set of accessors based on | |
// `defaults`. Instead of having to use accessor methods like `get` and | |
// `set`, just accesss your model properties: | |
// | |
// var user = new User(); | |
// user.name = 'David'; |
<key>Customized</key> | |
<dict> | |
<key>Delete Line</key> | |
<string>selectLine:, deleteBackward:</string> | |
<key>Duplicate Lines</key> | |
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string> | |
<key>Duplicate Current Line</key> | |
<string>moveToBeginningOfLine:, deleteToEndOfLine:, yank:, insertNewline:, moveToBeginningOfLine:, yank:</string> | |
</dict> |
function whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'MSTransition':'msTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
var FadeTransitionRegion = Backbone.Marionette.Region.extend({ | |
show: function(view){ | |
this.ensureEl(); | |
view.render(); | |
this.close(function() { | |
if (this.currentView && this.currentView !== view) { return; } | |
this.currentView = view; |