setup some stuff
This commit is contained in:
commit
82fb017d03
5
readme.md
Normal file
5
readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# AOC 2024
|
||||
|
||||
Going to try typescript this year.
|
||||
|
||||
<https://adventofcode.com/2024/>
|
21
today.sh
Normal file
21
today.sh
Normal file
@ -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}"
|
Loading…
Reference in New Issue
Block a user