My personal setup in OS X – for future reference.
Key | Action |
---|---|
Cmd + left/right | Home/End |
@function gcd($a, $b) { | |
@return if($b > 0, gcd($b, $a % $b), $a); | |
} | |
@function get-steps($elements, $page-size) { | |
@return $elements / gcd($page-size, $elements); | |
} | |
@function is-active($n, $step, $elements, $page-size) { | |
@return $n > ($step * $page-size % $elements); |
{ | |
"rules": { | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" | |
], | |
"eofline": true, | |
"forin": true, | |
"indent": [ |
# First: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
#go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
{ | |
"folders": | |
[ | |
{ | |
"file_exclude_patterns": | |
[ | |
"*.sublime-workspace", | |
"*.map", | |
"*.min.*" | |
], |
// 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 |
# 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 | |
) |
// 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; |
<template name="openModal"> | |
<button class="button" {{bind 'openModal: myModalTemplate'}}>Open modal</button> | |
</template> |
[{"id":1,"first_name":"Gary","last_name":"Ortiz","email":"[email protected]","country":"Indonesia","modified":"2015-05-16","vip":false}, | |
{"id":2,"first_name":"Albert","last_name":"Williamson","email":"[email protected]","country":"China","modified":"2015-03-11","vip":true}, | |
{"id":3,"first_name":"Mildred","last_name":"Fuller","email":"[email protected]","country":"Peru","modified":"2015-02-15","vip":true}, | |
{"id":4,"first_name":"Russell","last_name":"Robinson","email":"[email protected]","country":"Belarus","modified":"2014-10-31","vip":false}, | |
{"id":5,"first_name":"Laura","last_name":"Harper","email":"[email protected]","country":"Philippines","modified":"2015-01-14","vip":false}, | |
{"id":6,"first_name":"Larry","last_name":"Sanders","email":"[email protected]","country":"China","modified":"2015-01-11","vip":false}, | |
{"id":7,"first_name":"Michael","last_name":"Rice","email":"[email protected]","country":"Philippines","modified":"2014-12-06","vip":true}, | |
{"id":8,"first_name":"Sara","last_name":"Harris", |