Giter Club home page Giter Club logo

adventofcode's Introduction

Advent Of Code

Here I will put my solutions for Advent of Code. I will always default to TypeScript but might as well solve some days additionally in other languages like V or Python. I strongly discourage you from copying my solutions and recommend solving aoc yourself.

Running

To run my solutions you need Bun and Bash, Bun is in Beta for Windows and Bash isn't nativly available for Windows. As I use Linux I can't test how it is on Windows but I guess that the best solution is to simply use WSL.

Test Data

Advent Of Code always provides example data. I put this data into a file named like this: input${part}.txt. If you want to run the newest script with this data you can simply execute one of these commands:

$ bun solve
$ bun solve --debug

Real Data

To run my code with the real Data you will need to set your session cookie in a enviroment variable called COOKIE. you can do this like this:

  1. Go to any input like this: 2023 Day-1 Input
  2. Right Click anywhere on the site and select Inspect.
  3. Go to the network tab
  4. Reload the page.
  5. Look for the request and select it
  6. Under Request-headers there should be a header called Cookie. Copy the value of this header.
  7. Create a .env file in the root dir of this repo with the following content:
    COOKIE=${your copied session cookie}
    

When you are all setup you can run this command:

$ bun solve --solve

adventofcode's People

Contributors

dlurak avatar

Stargazers

 avatar  avatar

Watchers

 avatar

adventofcode's Issues

Day 5 Part 2 2023

In theory my solution for day 5 part 2 2023 works fine. But with the actual input my code gets terminated after ~30 seconds by Linux.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.