Skip to content

Instantly share code, notes, and snippets.

View echojc's full-sized avatar

Jonathan Chow echojc

View GitHub Profile
package main
import (
"fmt"
"log"
"sort"
)
func main() {
test1 := []string{
@echojc
echojc / aoc-2021-23.go
Created December 23, 2021 21:59
Interactive tool for manually solving the puzzle
package main
import (
"fmt"
"os"
"github.com/nsf/termbox-go"
)
func main() {
package main
import (
"fmt"
)
func main() {
p1, p2 := 4, 8
p1Score, p2Score := 0, 0
@echojc
echojc / aoc-2021-19.go
Created December 19, 2021 23:13
My solution for Day 19 of Advent of Code 2021.
package main
import (
"fmt"
"log"
"math"
"strings"
)
// ScanResult is just a type alias - we treat this as a set
@echojc
echojc / aoc-2021-14.go
Last active December 14, 2021 06:42
Algorithm for Day 14 of Advent of Code 2021
package main
import (
"fmt"
)
type Output struct {
Pair1, Pair2 string
NewElement string
}
@media print {
a {
text-decoration: none;
}
a::after {
display: none;
content: '';
}
{
init: function (elevators, floors) {
const floor_up_pressed = {};
const floor_down_pressed = {};
floors.forEach(floor => {
const f = floor;
f.on('up_button_pressed', () => {
floor_up_pressed[f.floorNum()] = true;
});
<!doctype html>
<html>
<head>
<title>vim demo</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
<style>
html,
body {
height: 100%;
@echojc
echojc / prototyping-area-0.txt
Created November 27, 2016 12:45
Stoked that I hacked together a rudimentary Simon Says game in Shenzhen I/O! http://puu.sh/sw3gW/107bebc92d.png
[name] simon says
[puzzle] SzSandbox
[traces]
......................
..154.....1555554.....
......14..1555D54.15C.
...94.154..14.2...1CA.
..16...14..955555556A.
.....1414.161414....A.

Keybase proof

I hereby claim:

  • I am echojc on github.
  • I am echojc (https://keybase.io/echojc) on keybase.
  • I have a public key whose fingerprint is E148 7B9D 3EA0 06A2 CF53 9A81 389D F30E 7772 F372

To claim this, I am signing this object: