Skip to content

Instantly share code, notes, and snippets.

View one19's full-sized avatar

Drew Showalter one19

View GitHub Profile
@one19
one19 / get-json.js
Last active December 14, 2020 23:09
recursively grab all JSON and give them id that won't change on changed content
import axios from 'axios';
const token = process.env.GIT_TOKEN = '';
const gitAxios = axios.create({
headers: { 'authorization': `Token ${token}` },
});
const parseContent = (base64, id) => {
const buff = Buffer.from(base64, 'base64');
const raw = JSON.parse(buff.toString());
@one19
one19 / get-averages.js
Created November 15, 2020 07:23
Jeopardy! 538 brain teaser
const row200 = [200, 200, 200, 200, 200, 200];
const row400 = [400, 400, 400, 400, 400, 400];
const row600 = [600, 600, 600, 600, 600, 600];
const row800 = [800, 800, 800, 800, 800, 800];
const row1000 = [1000, 1000, 1000, 1000, 1000, 1000];
const lowest = [row200, row400, row600, row800, row1000].flat();
const highest = [row1000, row800, row600, row400, row200].flat();
const sum = things => things.reduce((summa, item) => summa + item, 0);

Keybase proof

I hereby claim:

  • I am one19 on github.
  • I am werd119 (https://keybase.io/werd119) on keybase.
  • I have a public key whose fingerprint is 8F45 9ABA D7CD 1DAF 32E1 3478 9E26 5424 B806 6D02

To claim this, I am signing this object: