{"id":22499485,"url":"https://github.com/dsillman2000/advent-of-code-2024","last_synced_at":"2026-06-29T15:31:13.128Z","repository":{"id":266158324,"uuid":"897401685","full_name":"dsillman2000/advent-of-code-2024","owner":"dsillman2000","description":"David's Advent of Code for 2024 (PostgreSQL)","archived":false,"fork":false,"pushed_at":"2024-12-07T00:22:18.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T18:59:53.316Z","etag":null,"topics":["advent-of-code-2024","docker","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsillman2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-02T15:11:27.000Z","updated_at":"2024-12-07T00:20:59.000Z","dependencies_parsed_at":"2025-08-13T18:43:56.059Z","dependency_job_id":null,"html_url":"https://github.com/dsillman2000/advent-of-code-2024","commit_stats":null,"previous_names":["dsillman2000/advent-of-code-2024"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dsillman2000/advent-of-code-2024","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsillman2000%2Fadvent-of-code-2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsillman2000%2Fadvent-of-code-2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsillman2000%2Fadvent-of-code-2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsillman2000%2Fadvent-of-code-2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsillman2000","download_url":"https://codeload.github.com/dsillman2000/advent-of-code-2024/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsillman2000%2Fadvent-of-code-2024/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34933498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code-2024","docker","postgresql","sql"],"created_at":"2024-12-06T22:14:05.286Z","updated_at":"2026-06-29T15:31:13.111Z","avatar_url":"https://github.com/dsillman2000.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# advent-of-code-2024\n\nDavid's Advent of Code for 2024.\n\n## Requirements\n\nFor this project, you will only need Docker installed.\n\n## SQL Solutions\n\nAll of the solutions for this advent of code are written in Postgres SQL and managed using Docker.\n\nThe input documents for each Advent of Code question are located in the `inputs/` directory. The input documents are named `day-\u003cday\u003e.txt`. They are meant to be loaded as tables of raw text lines in the Postgres database.\n\nThe SQL solutions use a _setup_ script to load the original input text as a table in the Postgres database. These setup scripts are designed to run independently of one another and are executed during the startup of the container. The setup scripts are located in `setups/` directory. They each presuppose the existence of corresponding input text files in `inputs/`. Because of their systematic structure, I generate them from the contents of the `inputs/` directory by running the following command:\n\n```bash\nbash generate-setups.sh\n```\n\nThe solution SQL scripts, located at `solutions/day-\u003cday\u003e/solution-\u003cid\u003e.sql`, presuppose the existence of the _setup_ tables. Using a single query, they each construct the solution to the corresponding question.\n\nTo run through the SQL solutions, run the following command:\n\n```bash\nbash docker-run.sh --all\n```\n\nThis will build the Docker image (mounting the inputs and setup scripts) and start a container for the Postgres instance. Upon startup, the setup scripts will be run to construct the input tables. Finally, the solution scripts are run in order, and the output is printed to stdout.\n\nTo run a specific day's solution, run:\n\n```bash\nbash docker-run.sh --day \u003cday\u003e\n```\n\nTo skip rebuilding the docker image, you can supply the `--no-build` flag:\n\n```bash\nbash docker-run.sh --no-build --day 1\n```\n\n## Interactive SQL\n\nTo run an interactive `psql` session in the Docker container after running the setup scripts, run:\n\n```bash\nbash docker-interactive.sh\n```\n\nThis script also supports the \"--no-build\" flag to skip rebuilding the Docker image.\n\n## Acknowledgements\n\nAuthor:\n\n- David Sillman \u003cdsillman2000@gmail.com\u003e\n- Advent of Code 2024: https://adventofcode.com/2024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsillman2000%2Fadvent-of-code-2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsillman2000%2Fadvent-of-code-2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsillman2000%2Fadvent-of-code-2024/lists"}