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
public IEnumerable<string> ExpandPaths(IEnumerable<string> paths) | |
{ | |
var expandedPaths = new List<string>(); | |
foreach (var p in paths) | |
{ | |
if (Directory.Exists(p)) | |
{ | |
expandedPaths.AddRange(Directory.GetFiles(p)); | |
expandedPaths.AddRange(ExpandPaths(Directory.GetDirectories(p))); | |
} |
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 modelCtrl = ctrls[1]; | |
if (modelCtrl) { | |
$scope.$watch(function () { return modelCtrl.$modelValue; }, function (newValue, old) { | |
$scope.ngModel = newValue; | |
}); | |
} |
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
function t(obj) { | |
var typeString = ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1]; | |
if(typeString == "Object"){ return f(obj.constructor); } | |
else{ return typeString; } | |
} | |
function f(m){ | |
return m.name || m.toString().match(/function\s+([^(]+)/)[1]; | |
} |
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 flatten = function (v, cb, result) { | |
result = result || []; | |
if (v instanceof Array) { | |
v.forEach(function (v) { flatten(v, cb, result); }); | |
return result | |
} | |
result.push(cb ? cb(v) : v); | |
return result; | |
}; |
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
// https://github.com/Automattic/cli-table/blob/db9f235d50680d7bdcdd0e42f1c85ab1de273ed1/lib/cli-table/utils.js#L79 | |
// Strip unicode color data and get the underlying string length | |
exports.strlen = function(str){ | |
var code = /\u001b\[(?:\d*;){0,5}\d*m/g; | |
var stripped = ("" + str).replace(code,''); | |
var split = stripped.split("\n"); | |
return split.reduce(function (memo, s) { return (s.length > memo) ? s.length : memo }, 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
/^function\s?([^\s(]*)/ |
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
((?:.{1,x}(?=\s|$)|[^\s]+)(?:\s?)) |
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
// taken from: https://github.com/esvit/ng-table/blob/master/ng-table.js | |
scope: { | |
'params': '=ngTablePagination', | |
'templateUrl': '=' | |
}, | |
replace: false, | |
link: function (scope, element, attrs) { | |
scope.params.settings().$scope.$on('ngTableAfterReloadData', function () { |
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
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK); | |
result.Content = new ByteArrayContent(File.ReadAllBytes("path")); | |
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/javascript"); | |
return result; |
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
git rev-list HEAD -- lib/rules/space-in-brackets.js | tail -n1 | xargs git tag --contains | head -n1 |
OlderNewer