Skip to content

Instantly share code, notes, and snippets.

View duemir's full-sized avatar

Denys Digtiar duemir

View GitHub Profile
debug: Downloaded /evergreen/jenkins/home/plugins/matrix-project.hpi (195712 bytes)
2018-08-24T03:49:41.520Z - info: [request-promise-retry] Encountered error Error: ESOCKETTIMEDOUT for GET request to http://mirrors.jenkins.io/war/2.138/jenkins.war, retry count 10
...
2018-08-24T03:50:05.700Z - info: [request-promise-retry] Encountered error Error: ESOCKETTIMEDOUT for GET request to https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/workflow/workflow-durable-task-step/2.19/workflow-durable-t
info: Download complete for /evergreen/jenkins/home/plugins/workflow-durable-task-step.hpi (Took 163.89s)
...
[SEVERE][2018-08-24 03:52:36] Failed Inspecting plugin /evergreen/jenkins/home/plugins/workflow-basic-steps.hpi (from jenkins.InitReactorRunner$1 onTaskFailed)
java.io.IOException: Failed to expand /evergreen/jenkins/home/plugins/workflow-basic-steps.hpi
at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:632)
at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:
@duemir
duemir / luhn-node.js
Created March 22, 2013 12:56
JS Luhn algorithm for node - functional style!
var luhn = function (number) {
return number.split('').map(function (digit, index, arr) {
return (index % 2 !== arr.length % 2) ? parseInt(digit, 10) : 2 * digit;
}).reduce(function sum(val, cur, idx, arr) {
return val + (cur < 10 ? parseInt(cur, 10) : (String(cur).split('').reduce(sum, 0)));
}, 0) % 10;
};
exports.is_valid = function (number) {
return luhn(number) === 0;