Implement API server (in Node.js) based on the API specification.
It shouldn't take more than one hour to do this.
We like:
- Tests
- Nice commit messages
- Working code
<html> | |
<head> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
<link href="https://fonts.googleapis.com/css2?family=Antonio&display=swap" rel="stylesheet"> | |
</head> | |
</html> |
{"lastUpload":"2020-01-23T08:46:58.022Z","extensionVersion":"v3.4.3"} |
add_newline = false | |
prompt_order = [ | |
"username", | |
"hostname", | |
"kubernetes", | |
"package", | |
"dotnet", | |
"golang", | |
"java", | |
"nodejs", |
#!/usr/bin/env node | |
/** | |
* script to get NASA APOD pictures in HD quality for specified period of time | |
* you need NodeJS v12+ to use shebang, and you need jq and wget | |
* Get the API key from NASA https://api.nasa.gov/index.html | |
* usage: NASA_API_KEY='asdg' APOD_FROM=2019-09-09 APOD_TO="2000-01-01" ./apod.js | |
*/ | |
const {exec} = require('child_process') |
#!/bin/bash | |
export NODE_ENV=production | |
function benchmark { | |
echo $NODE_ENV | |
nvm use "$1" | |
rm -rf node_modules | |
npm i | |
node for-map.js >> results.txt |
#!/usr/bin/env node | |
const Benchmark = require('benchmark') | |
const spread = (d1, d2) => () => { | |
const d = [...d1, ...d2] | |
} | |
const concat = (d1, d2) => () => { | |
const d = d1.concat(d2) |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" | |
crossorigin="anonymous"> | |
</script> | |
</head> | |
<h1>Elephant Shop</h1> | |
<div> | |
<h3>We have</h3> | |
<table> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Transmit text</title> | |
</head> | |
<body> | |
<h1>ALICE</h1> | |
<div class="text">test</div> |
const DEFAULT_MODIFIER = { multiplier: 1, offset: 0, error: Number.MAX_VALUE } | |
const users = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'] | |
const sourceData = [ | |
{ A: 1, B: 0.8, C: 0.34, D: 0.33, E: 0 }, | |
{ B: 1, A: 0.9, C: 0.85, F: 0.5, J: 0.1, G: 0 }, | |
{ B: 1, H: 0.7, D: 0.5, J: 0.3, F: 0 }, | |
{ C: 1, A: 0.9, B: 0.8, I: 0.6, E: 0.1, J: 0 } | |
] | |
const getAverage = arr => |