Same procedure as every year… right?

Related tags

Command-line aoc2022
Overview

Advent of Code 2022 solutions

What this repository is

This repository contains solutions to Eric Wastls Advent of Code 2022. Thank you, Eric!

While the code aims to be as fast as possible (the goal is to complete all puzzles of 2022 in under one second), I often lack the time and/or knowledge to optimize it properly.

What this repository is not

I'm currently learning Rust, so don't expect the solutions to be idiomatic.

This is not the "best" or maybe not even a "good" solution. Most often it "just works".
Please do not use this repository to learn how to write good or fast code.

Setup

  • Create a file named "session_key.txt" in the "src" folder.
  • Get your session key
    • Press CTRL + Shift + I
    • Switch to the "Network" tab
    • Visit (or reload) https://adventofcode.com/ (& make sure you're logged in)
    • Select a request by clicking on it
    • On the right side, select "Cookies"
    • Copy the part between the quotes.
      • The session key should be 96 Hex-Characters
      • WARNING: DO NOT SHARE THIS KEY. NOT EVEN WITH YOUR DOG!
  • Paste this string (and only this string!) into the "session_key.txt" file
  • You can now run the project with Cargo (you must have Rust installed).
  • To schedule multiple runs (for averaging the times), add the number of runs just after the cargo command

If the request fails with "500 Internal Server Error", you entered a wrong session key.

You might also like...
ddi  is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background
ddi is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background

ddi A safer dd Introduction If you ever used dd, the GNU coreutil that lets you copy data from one file to another, then you may have encountered a ty

Switch windows of same app with alt + ` on windows pc.

Windows Switcher Switch windows of same app with alt + ` on windows pc. 250k single file executable downloaded from Github Release. No installation re

Logging for text that should stay in the same place in a console.

console_static_text Crate for logging text that should stay in the same place in a console. This measures words to handle wrapping and has some consol

Bruteforce connecting to a specific Sea of Thieves server. Useful if you want to be in the same server as your friends.

SoT Server Finder Find which Sea of Thieves server you're connected to. Useful if you want to be in the same server as your friends. Setup Download so

Crunch is a command-line interface (CLI) to claim staking rewards  every X hours for Substrate-based chains
Crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains

crunch · crunch is a command-line interface (CLI) to claim staking rewards every X hours for Substrate-based chains. Why use crunch To automate payout

A Rust CLI that makes mechanical keyboard sound effects on every key press
A Rust CLI that makes mechanical keyboard sound effects on every key press

Rustyvibes A Rust CLI that makes mechanical keyboard sound effects on every key press Rustyvibes.mp4 Installation macOS: brew install kb24x7/rustyvibe

A diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to retain every change.

Docchi is a diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to save very often. User'

Rust-advent - Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)
Rust-advent - Learning Rust by solving advent of code challenges (Streaming live on Twitch every Monday)

Rust advent 🦀 🐚 Learning Rust by implementing solutions for Advent of Code problems. 🎥 HEY, we are live-streaming our attempts to solve the exercis

A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

Comments
  • Day 10b - First column is not rendered

    Day 10b - First column is not rendered

    For whatever reason the first column is not rendered. Probably there is some sort of off-by-one error with the index.

    At least in my case the letters can be read nonetheless, so a (correct) solution was submitted anyways.

    Correctness 
    opened by itsCryne 0
  • Day 14 - No need to drop sand from (500,0)

    Day 14 - No need to drop sand from (500,0)

    Because falling sand does not alter the path until the point where it settles during step n, subsequent sand pieces will always take the same path until step n-1. Thus, many steps can be saved by caching this position and "generating" sand there.

    Performance - Time 
    opened by itsCryne 0
Owner
Patrick
Physics student @​Uni Stuttgart | Dev @DeutscheDiscordAdmins
Patrick
zman is a CLI year (time) progress that small, fast, and just one single binary.

zman zman is a CLI year (time) progress that small, fast, and just one single binary. Features Show year progress Show month, and week progress Show r

azzamsa 17 Dec 21, 2022
Advent of Code 2021, in rust this year

Advent of Code 2021 ?? Solutions for the 2021 edition of Advent of Code. This year, I try to do this in Rust ?? . I discover the language, so do not t

Florian Gaudin-Delrieu 1 Aug 12, 2022
Advent of Code, this year I will attempt the 25 different languages challenge

Advent of Code 2022 As this is my third year doing Advent of Code, this time I will try the 25 Different Languages Challenge, which is solving the pro

Andreu Vall Hernàndez 7 Dec 27, 2022
Convert a unix timestamp (seconds) to a struct {year, month, day, hour, minute, second, weekday}.

uts2ts uts2ts is a simple function that does only one thing: It converts a unix timestamp to something slightly more useful. ;-) So why then? Well, it

Helmut K. C. Tessarek 6 Jul 26, 2023
Send emails right from the terminal using Rust!

Send emails right from the terminal using Rust!

Dhravya Shah 7 Dec 21, 2022
A CLI tool connected to GPT-3 to help find the right terminal command

Command Recall A CLI tool connected to GPT-3 to help find the right terminal command Install to install the cli: cargo install --git https://github.co

Camille Moatti 102 Feb 18, 2023
Browse and listen to thousands of radio stations across the globe right from your terminal 🌎 📻 🎵✨

TuneIn CLI A command line interface for TuneIn Radio. You can search for stations, play them, and see what's currently playing. ?? Installation Compil

Tsiry Sandratraina 8 Mar 2, 2023
🍥 Access the rust playground right in your terminal

rustycli — ?? Access the rust playground right in your terminal ?? rustycli is a tool, allowing you to access the rust playground right in the termina

Nabeen Tiwaree 29 Jul 31, 2023
Get your github contributions right in your terminal, blazingly fast!

GitColorScripts Get your github contributions right in your terminal! Installation Install via yay yay -S gitcolorscripts Install manually Download t

VoidCupboard 56 Jul 12, 2023
A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal

CSV-GREP csv-grep is an intuitive TUI application writting with ratatui.rs for reading, viewing and quickly analysing csv files right on the terminal.

Anthony Ezeabasili 16 Mar 10, 2024