template :D

This commit is contained in:
KoenDR06 2025-12-01 13:44:35 +01:00
parent f2c4afd7b4
commit 1f5b785b06
4 changed files with 26 additions and 2 deletions

7
new.sh Executable file
View file

@ -0,0 +1,7 @@
curl https://adventofcode.com/$1/day/$2/input --cookie session=$(cat .session) > inputs/$1-$2
day=$(echo $1 | sed 's/..//')
year=$(printf %02d $2)
cp -n template.hs src/Day${day}${year}.hs
alias run="ghc src/Day${day}${year}.hs -o out && cat inputs/$1-$2 | ./out && hyperfine --input inputs/$1-$2 -N --warmup 10 --runs 10 \"./out\" && rm out"