Skip to content

A space to host my solutions for the AoC. Automates data retrieval, problem setup, CI workflows, caching, and Livebook integration.

License

Notifications You must be signed in to change notification settings

Elixir-journey/advent-journey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elixir Journey

Repository logo

Welcome to the Elixir Journey repository! This project is central to my Elixir learning journey, covering:

Using Livebook, I document each topic in interactive notebooks with solutions, notes, challenges I overcame, and resources for further exploration. This is my way of taking a more hands-on approach to using Elixir/Phoenix/LiveView design and implement robust software solutions.

Table of Contents

Key features

  • Individual notebooks per subject: Separate notebooks for Advent of Code, Exercism, Codewars, and reading resources, each with solutions, explanations, and detailed notes.
  • Protected code artifacts integrity: The CI blocks merging or pushing to main if any new scripts used in the notebooks aren’t listed as protected artifacts, maintaining consistency across Livebooks.
  • Comprehensive CI pipeline: A GitHub Actions pipeline enforces code quality, security checks, and protected artifact verification, ensuring all notebooks reference the correct, up-to-date scripts.
  • Live test results in notebooks: As each module is evaluated in Livebook, unit tests are run with results displayed in-line, showing pass/fail indicators for immediate feedback.

For the Livebook for solutions and notes for the AoC, you can expect these features:

  • Dynamic year selection: Switch between years in the Advent of Code notebook, viewing solutions, daily progress, and notes for each year. A dropdown control dynamically renders data, including a daily progress table with visual indicators. Progress tracking with visual indicators: Each year includes a progress table that uses symbols like "⭐⭐" for completed days, "⭐" when I completed 1 of 2 parts, and "❌" when I didn't complete any parts for that day. This makes it easy to see my progression at a glance.
  • Caching system: Cached AoC data minimizes requests to AoC’s website, reducing redundant calls and ensuring the Livebook loads quickly with current data.
  • Scheduled data updates: GitHub Actions automatically updates AoC progress data weekly (or daily during December), keeping tables current without manual intervention.

Local setup

Prerequisites

Elixir: The language runtime. Livebook: For interactive notebooks. Phoenix (optional): If Phoenix-based content is added in a future update.

Installation steps

  1. Clone the repository:
   git clone git@github.com:Kavignon/Elixir-journey.git
   cd Elixir-journey
  1. Install dependencies:
mix deps.get
  1. Install Livebook dependencies:
mix do local.rebar --force, local.hex --force
mix escript.install hex livebook

After installation, ensure ~/.mix/escripts is in your PATH if prompted. Otherwise, you will get a warning in the following format:

warning: you must append "/Users/your-user-name/.mix/escripts" to your PATH if you want to invoke escripts by name

For instance, if you're using ZSH as a shell, you'll use a text editor (i.e., VIM/nano/VS Code) to open your configuration and append that reference to your PATH. Once you're done, source your shell, and I advise you to reload it with $SHELL.

Don't hesitate to look at the FAQ in case of problems; if it doesn't help with your problem, you can always open a new issue on the repository.

Usage instructions

In the browser

Run the Livebook for my Exercism notes + observations using the button below!

Run in Livebook

It'll bring you to the following URL:

You'll see this in the browser:

image

You will want to click on Run notebook and then Allow, and the livebook will run in your browser.

In your local environment

  1. Start the Livebook server:
livebook server
  1. Open the provided URL (usually http://localhost:8080?token=yourtokenvalue) in your browser.
  2. In Livebook, click Open
  3. Select the option From storage and provide the path to elixir_notes.livemd from the repository folder to open the notebook.

You can also do the following after running livebook server:

  1. Click on Open.
  2. Select the option From URL and provide the URL to one of the Elixir livebook notes from the repository such as this one in Notebook URL
  3. Click on Import.

FAQ

Read more here

About

A space to host my solutions for the AoC. Automates data retrieval, problem setup, CI workflows, caching, and Livebook integration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published