Skip to content

Instantly share code, notes, and snippets.

<img src="dog.png" /> <!-- wait, how does it work again? -->
@pseale
pseale / JS_testing_questionnaire.html
Last active August 29, 2015 14:06
JavaScript testing questionnaire for Houston.js
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head><title>JavaScript testing questionnaire for Houston.js</title></head>
<style>
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 10px;
}
h5 {
@pseale
pseale / day3.js
Last active December 12, 2016 06:16
/* test results:
PASS __test__\day3.test.js
Acceptance tests
√ 5 10 25
√ 5 10 25, but not in any order of size
√ valid triangle 5 5 5
Vertical parsing
√ Input with wrong number of rows will throw an error (15ms)
√ Vertical triangles are parsed in groups of 3
*/
/* test results:
PASS __tests__\day4.test.js
Acceptance tests
aaaaa-bbb-z-y-x-123[abxyz] is a real room (15ms)
totally-real-room-200[decoy] is not a real room
parsing
aaaaa-bbb-z-y-x-123[abxyz]
generating a checksum
aaaaa-bbb-z-y-x-123[abxyz]
decrypt
@pseale
pseale / day6.js
Last active December 13, 2016 01:17
//----------------------------------------------------
// main script
import fs = require("fs")
import _ = require("lodash")
import parse = require("./parse")
import decode = require("./decode")
const input = fs.readFileSync("./input.txt", "utf8")
const columns = parse(input)
const decoded = decode(columns)