Mensch font, Source Code Pro, Webkit, Chrome, Firefox, Kaleidoscope, iTerm, Sublime Text, Sequel Pro, Codekit,
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
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": " ", | |
"color-shorthand": false, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": true, | |
"quotes": "double", |
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
.filter('initials', function () { | |
var initialsFilter = function(input) { | |
if (input) { | |
var wordArr = input.split(' '); | |
var initials = wordArr.map(function(item) { | |
return item.substring(0,1).toUpperCase(); | |
}); | |
return initials.join('.'); | |
} | |
}; |
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
.filter('titlecase', function () { | |
var titleCaseFilter = function(input) { | |
if (input) { | |
// NOTE: http://stackoverflow.com/questions/196972/convert-string-to-title-case-with-javascript | |
return input.replace(/\w\S*/g, function(txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); | |
} | |
}; | |
return titleCaseFilter; | |
}) |
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
.filter('startFrom', function() { | |
return function(input, start) { | |
if (input) { | |
start = +start; //parse to int | |
return input.slice(start); | |
} | |
return []; | |
} | |
}); |
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
filter("minCharFilter", function($filter) { | |
return function (array, params, limit) { | |
if (params && params.length >= limit) { | |
return $filter('filter')(array, params); | |
} else { | |
return []; | |
} | |
} | |
}) |
I hereby claim:
- I am miguelbermudez on github.
- I am miguelbermudez (https://keybase.io/miguelbermudez) on keybase.
- I have a public key whose fingerprint is 73E3 CB35 9A8A B910 9F27 BD62 2ABE 6BD8 4123 A651
To claim this, I am signing this object:
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
/** | |
* Two.js Angular Directive Demo | |
* Directive Source | |
* | |
* TODO: | |
* - make directive minify-safe | |
* | |
* July 7, 2013 | |
*/ |
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
# saved for future | |
# http://www.crispymtn.com/stories/the-algorithm-for-a-perfectly-balanced-photo-gallery | |
# https://github.com/crispymtn/linear-partition/blob/master/linear_partition.coffee | |
# Linear partition | |
# Partitions a sequence of non-negative integers into k ranges | |
# Based on Óscar López implementation in Python (http://stackoverflow.com/a/7942946) | |
# Also see http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM | |
# Dependencies: UnderscoreJS (http://www.underscorejs.org) | |
# Example: linear_partition([9,2,6,3,8,5,8,1,7,3,4], 3) => [[9,2,6,3],[8,5,8],[1,7,3,4]] |