commit 82fb017d03d92710c2057fdf4555c5781e0e1f7e Author: David Ashby Date: Sun Nov 3 14:29:28 2024 -0500 setup some stuff diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..5bbf21c --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +# AOC 2024 + +Going to try typescript this year. + + diff --git a/today.sh b/today.sh new file mode 100644 index 0000000..a6f79b2 --- /dev/null +++ b/today.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +__year=2024 + +__day="${1}" +if [ "${day}" == ""]; then + __day=$(date '+%d') +fi + +padded=$(printf "%02g" ${__day}) +mkdir -p ${padded}/inputs +touch ${padded}/inputs/testinput +if [ ! -f "${padded}/inputs/input" ]; then + curl -s \ + -A "https://git.yetaga.in/alazyreader/AdventOfCode${__year}/" \ + -H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${__day##0}/input > "${padded}/inputs/input" +fi +# if [ ! -f "${padded}/main.go" ]; then +# cp -n main.go.tmpl ${padded}/main.go +# fi +open "https://adventofcode.com/${__year}/day/${__day}" \ No newline at end of file