This file contains hidden or 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
// ==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== |
This file contains hidden or 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
const fetch = require('node-fetch'); | |
const url = 'https://www.random.org/decimal-fractions/?num=1&dec=10&col=1&format=plain&rnd=new'; | |
fetch(url).then(response => response.text()) | |
.then(textNumber => { | |
console.log(textNumber); | |
}); | |
// write implementation fo threeRandomNumbers here |
This file contains hidden or 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
// compile with c++ --std=c++17 ./c++17.cpp | |
#include <iostream> | |
#include <vector> | |
#include <stdexcept> | |
#include <tuple> | |
#include <type_traits> | |
template <class T> using il = std::initializer_list<T>; | |
auto reduce = [](const auto& reducer, const auto& collection, auto&& init) -> auto { |
This file contains hidden or 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
const { reduce, range, map } = require('lodash/fp') | |
const fibinacci = | |
num => reduce( | |
acc => [ | |
acc[0] + acc[1], | |
acc[0] | |
], | |
[1,0], | |
range(0, num) |
This file contains hidden or 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
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, |
This file contains hidden or 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
/* | |
* What are your thoughts on nested conditionals? | |
* replacing with if/else if/else statements removes your ability to use const | |
* ESLint doesn't like them, but for cascading if/else flows, I think proper formatting | |
* eliminates readability concerns | |
*/ | |
const word = | |
isFoo ? 'a' : // if isFoo | |
isBar ? 'b' : // else if isBar |