Giter Club home page Giter Club logo

advent-of-code's Introduction

Solutions to Advent of Code problems

Downloading Input

In order for the download input script to work, you must provide your Advent of Code session cookie to the program in an environment variable (you can place this in your .zshrc or .bashrc file; the cookie should be valid for about a month):

export AOC_COOKIE=your_cookie

To obtain the cookie, sign into Advent of Code through your browser, then use the developer tools to examine the cookies. For example, in Chrome, this will be under the Application tab of the developer tools. Here, there will be a value under "session" that should be a long value of characters and numbers. This is the value you will want to copy and replace "your_cookie" in the above example with.

Once this variable is exported, you can use the following command to download the input (this assumes you have ruby installed, ideally the version in .ruby-version):

ruby gi.rb 04

The above will download the input for day 4 of the current year, create some starter code, and open the problem in your browser (opening the browser currently will only work in MacOS). To specify a different year, you can include it as a second argument:

ruby gi.rb 4 2021

This will download the input and set up the initial files for day 4 of 2021 instead of the current year.

advent-of-code's People

Contributors

seemaullal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.