My personal setup in OS X – for future reference.
| Key | Action |
|---|---|
| Cmd + left/right | Home/End |
| function extendDeep(target) { | |
| // Run through rest parameters | |
| Array.prototype.slice.call(arguments, 1).forEach(function (source) { | |
| if (typeof target === "object") { | |
| if (typeof source === "object") { | |
| // If source is an array, only copy enumerable properties | |
| var keys = (Array.isArray(source) ? Object.keys(source) : Object.getOwnPropertyNames(source)); | |
| // Iterate over keys | |
| keys.forEach(function (key) { |
| @mixin toggled($selector, $media...) { | |
| #{unquote($selector)}:checked ~ & { | |
| @if length($media) > 0 { | |
| @include media($media...) { | |
| @content; | |
| } | |
| } | |
| @else { | |
| @content; | |
| } |
| // Adding some simplistic fields | |
| AccountsTemplates.addFields([ | |
| { | |
| _id: "address", | |
| type: "text", | |
| // Options object with custom properties for my layout | |
| options: { | |
| // Put a divider before this field | |
| dividerBefore: true |
| [{"id":1,"first_name":"Gary","last_name":"Ortiz","email":"gortiz0@mapy.cz","country":"Indonesia","modified":"2015-05-16","vip":false}, | |
| {"id":2,"first_name":"Albert","last_name":"Williamson","email":"awilliamson1@narod.ru","country":"China","modified":"2015-03-11","vip":true}, | |
| {"id":3,"first_name":"Mildred","last_name":"Fuller","email":"mfuller2@npr.org","country":"Peru","modified":"2015-02-15","vip":true}, | |
| {"id":4,"first_name":"Russell","last_name":"Robinson","email":"rrobinson3@google.pl","country":"Belarus","modified":"2014-10-31","vip":false}, | |
| {"id":5,"first_name":"Laura","last_name":"Harper","email":"lharper4@boston.com","country":"Philippines","modified":"2015-01-14","vip":false}, | |
| {"id":6,"first_name":"Larry","last_name":"Sanders","email":"lsanders5@cornell.edu","country":"China","modified":"2015-01-11","vip":false}, | |
| {"id":7,"first_name":"Michael","last_name":"Rice","email":"mrice6@geocities.jp","country":"Philippines","modified":"2014-12-06","vip":true}, | |
| {"id":8,"first_name":"Sara","last_name":"Harris", |
| <template name="openModal"> | |
| <button class="button" {{bind 'openModal: myModalTemplate'}}>Open modal</button> | |
| </template> |
| // Override the original behaviour from sewdn:collection-behaviours | |
| CollectionBehaviours.defineBehaviour("trackable", function (getTransform, args) { | |
| if (_.isArray(args[0])) | |
| args = args[0]; | |
| // Track all updated fields or only a list of fields | |
| if (args[0] === true) { | |
| var track_field = args[1] || "updatedTrack", | |
| slice = false; |
| # This regex throws away anything between quotes at the root level, and captures | |
| # anything between parentheses preceded by a keyword at the root level | |
| # It uses this technique: http://www.rexegg.com/regex-best-trick.html | |
| / | |
| (?: # Group | |
| ( \1 # Capturing group | |
| ['"] # Quotation mark | |
| ) |
| // Return the last truthy argument | |
| Template.registerHelper("and", (...args) => _.reduce(popkw(args), (memo, item) => memo && item)); | |
| // Return the first truthy argument | |
| Template.registerHelper("or", (...args) => _.reduce(popkw(args), (memo, item) => memo || item)); | |
| // Return whether all arguments are strictly equal | |
| Template.registerHelper("is", (...args) => compareLeft(popkw(args), (a, b) => a === b)); | |
| // Return whether each argument is greater than the previous |
| { | |
| "folders": | |
| [ | |
| { | |
| "file_exclude_patterns": | |
| [ | |
| "*.sublime-workspace", | |
| "*.map", | |
| "*.min.*" | |
| ], |