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
{ | |
"directory": "components" | |
} |
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
#!/bin/bash | |
# | |
# Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion, should work on earlier OSes too. | |
# Tested on 10.8.2, 10.8.3, 10.8.5, 10.9.0, 10.9.1, 10.9.2, 10.9.3, and 10.9.4 | |
# | |
# You may have to re-apply the fix after some system updates, including but not limited to those below: | |
# 10.9.X to 10.9.4 | |
# 10.9.X to 10.9.3 | |
# 10.9.X to 10.9.2 | |
# 10.8.X to 10.8.3 |
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
app.filter 'startFrom', -> | |
(input, start) -> | |
if input? and start? and typeof start is 'number' | |
start = +start | |
input.slice(start) |
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
app.directive 'ngBlur', -> | |
(scope, elem, attrs) -> | |
elem.on "blur", -> | |
scope.$apply attrs.ngBlur | |
return | |
app.directive 'ngFocus', -> | |
(scope, elem, attrs) -> | |
elem.on "focus", -> | |
scope.$apply attrs.ngFocus |
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
smallDate: (raw) -> | |
date = new Date(raw or "").toDateString() | |
dateExp = /(\w{3})\s(\w{3})\s(\d{1,2})\s(\d{4})/i | |
dateArr = date.match(dateExp) | |
month = dateArr[2] | |
date = parseInt(dateArr[3], 10) | |
year = dateArr[4] | |
pretty = "#{month} #{date}, #{year}" | |
pretty |
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
app.directive 'dialogbox', -> | |
{ | |
transclude : true | |
template : "<div data-ng-transclude></div>" | |
restrict : "A" | |
replace : true | |
scope : false | |
link : (scope, elem, attrs) -> | |
$elem = $(elem).addClass('dialog') | |
dur = 250 |
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
app.directive 'dialogbox', -> | |
{ | |
transclude : true | |
template : "<div class='dialog' data-ng-transclude></div>" | |
restrict : "A" | |
replace : true | |
scope : false | |
link : (scope, elem, attrs) -> | |
$elem = $(elem).addClass('dialog') | |
#dur = if scope.isDesktop then 250 else 0 |
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
var STATIC_ASSET_REGEX = /\..*/; | |
var routingTable = { | |
'/foo': true, | |
'/bar': true | |
}; | |
module.exports.routes = { | |
'get /*': function(req, res, next) { | |
// Fast check for static assets | |
if (STATIC_ASSET_REGEX.test(req.path)) return next(); |
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
# By default requires jQuery.easing by default | |
# change default easing to 'swing' if not using | |
# jQuery.slideFade | |
# Copyright © Brian Frichette, 2012+, All Rights Reserved. | |
# License: MIT http://opensource.org/licenses/mit-license.php | |
# Usage: | |
# @param {String} type A string value of either 'show', 'hide', or 'toggle' (default: 'toggle') |
OlderNewer