template :D
This commit is contained in:
parent
f2c4afd7b4
commit
1f5b785b06
4 changed files with 26 additions and 2 deletions
7
new.sh
Executable file
7
new.sh
Executable 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue