Skip to content

Instantly share code, notes, and snippets.

View doug-numetric's full-sized avatar

Doug Coburn doug-numetric

View GitHub Profile
@doug-numetric
doug-numetric / bamboo-violentmonkey.js
Last active October 25, 2023 14:05
bamboo download combined ci logs
// ==UserScript==
// @name Download all
// @namespace Violentmonkey Scripts
// @include https://bamboo.internal.numetric.com/*/ci_test_logs
// @grant none
// @version 1.0
// @author -
// @description 10/24/2023, 1:01:20 PM
// ==/UserScript==
@doug-numetric
doug-numetric / functionalFibonacci.js
Created July 25, 2017 06:21
Efficient fibonacci calculator without loops or recursion
const { reduce, range, map } = require('lodash/fp')
const fibinacci =
num => reduce(
acc => [
acc[0] + acc[1],
acc[0]
],
[1,0],
range(0, num)
@doug-numetric
doug-numetric / conditionalExpression.js
Created July 24, 2017 22:56
ESLint friendly conditional expression
const branch = function(b) {
return b.if ? b.then : b.else;
}
const fizzbuzz = function(num) {
return branch({
if: num % 3 === 0 && num % 5 === 0,
then: 'fizzbuzz',
else: branch({
if: num % 3 === 0,