From 91b4352bb2563ae335732b0042c6e422414b6e1e Mon Sep 17 00:00:00 2001 From: j-james Date: Wed, 23 Nov 2022 02:18:23 -0800 Subject: Prepare scripts and templates for 2022 --- 2022/one | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 2022/one (limited to '2022/one') diff --git a/2022/one b/2022/one new file mode 100755 index 0000000..6b7db35 --- /dev/null +++ b/2022/one @@ -0,0 +1,7 @@ +#!/bin/bash + +source "vars" +LEVEL="1" +SUBMIT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/answer" + +curl $SUBMIT_URL --cookie "session=${TOKEN}" --data "level=${LEVEL}&answer=$1" | rg -C 1 "main" -- cgit v1.2.3-70-g09d2