From 82fb017d03d92710c2057fdf4555c5781e0e1f7e Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sun, 3 Nov 2024 14:29:28 -0500 Subject: [PATCH] setup some stuff --- readme.md | 5 +++++ today.sh | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 readme.md create mode 100644 today.sh 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