---
title: Node
---
flowchart LR
id
This file contains 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 sum = (xs: number[]): number => xs.reduce((acc, x) => acc + x, 0); | |
const parseInput = (input: string): number[][] => { | |
return input | |
.split(/\n\n/) | |
.map((chunk) => chunk.split("\n").map((line) => parseInt(line, 10))); | |
}; | |
export const part1 = (input: string): number => { | |
const totals = parseInput(input).map((inventory) => sum(inventory)); |
This file contains 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 Humble Bundle All Keys | |
// @namespace https://github.com/jordanadams | |
// @version 0.1 | |
// @description Snags all your keys on Humble | |
// @author Jordan Adams | |
// @match https://www.humblebundle.com/home/keys | |
// @grant none | |
// ==/UserScript== |
This file contains 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
#!/usr/bin/env bash | |
CREDENTIALS=$( | |
cf curl "/v2/service_instances?q=name:$1" | \ | |
jq '.resources[0].entity.service_bindings_url' | \ | |
xargs cf curl | \ | |
jq '.resources[0].entity.credentials' | |
) | |
echo $CREDENTIALS | jq |
This file contains 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
LOW_BATTERY_THRESHOLD=20 | |
NEWLINE='\n' | |
ICON_GITHUB="\ue725" | |
ICON_LOW_BATTERY="\uf579" | |
current_branch() { | |
echo $(git branch | grep '* ' | sed 's/* //') | |
} | |
prompt_dir() { | |
if [[ $(pwd) == $HOME ]] |
This file contains 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
// Mapping between letters and values | |
const numbers = { | |
A: 1, | |
B: 2, | |
C: 3, | |
D: 4, | |
E: 5, | |
F: 6, | |
G: 7 | |
// ... |
- Learn a general purpose language such as C, Go, Rust, Elixir or Lisp
- Learn Functional Programming (and apply it to a JS project)
- Deploy a Node app (Likely to be JS Map)
- Make at least one open source contribution per month (Ideally 3 per month toward the year end)
- Get adept at flying first quadcopter and upgrade to a custom build.
- Learn some Big Data (Hadoop etc.)
- Build something in React+Redux