{"id":29162722,"url":"https://github.com/usrme/protohackers","last_synced_at":"2025-07-01T05:07:11.762Z","repository":{"id":301012913,"uuid":"1007862950","full_name":"usrme/protohackers","owner":"usrme","description":"Protohackers server programming challenge answers","archived":false,"fork":false,"pushed_at":"2025-06-24T17:36:49.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T18:42:24.448Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usrme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-06-24T16:40:44.000Z","updated_at":"2025-06-24T17:36:53.000Z","dependencies_parsed_at":"2025-06-24T18:52:28.535Z","dependency_job_id":null,"html_url":"https://github.com/usrme/protohackers","commit_stats":null,"previous_names":["usrme/protohackers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/usrme/protohackers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrme%2Fprotohackers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrme%2Fprotohackers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrme%2Fprotohackers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrme%2Fprotohackers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usrme","download_url":"https://codeload.github.com/usrme/protohackers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrme%2Fprotohackers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262900180,"owners_count":23381663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-07-01T05:07:09.972Z","updated_at":"2025-07-01T05:07:11.751Z","avatar_url":"https://github.com/usrme.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protohackers\n\n[Protohackers](https://protohackers.com/) server programming challenge answers.\n\n## Deployment\n\n- install ['flyctl'](https://fly.io/docs/flyctl/);\n- authenticate;\n- navigate to the root of the repository;\n- allocate dedicated IPv4 address (costs $2/mo): `flyctl ips allocate-v4 --app \u003capp name\u003e`;\n  - without this it is not possible to connect over just TCP, even if an IPv6 address is allocated;\n  - [here's](https://www.tigrisdata.com/blog/docker-registry-at-home/) a blog post over at [Tigris](https://tigrisdata.com) that gives away $50 in credits;\n  - more information about this requirement [here](https://community.fly.io/t/tcp-and-udp-service-ports-dont-work/9746) and [here](https://community.fly.io/t/announcement-shared-anycast-ipv4/9384/25);\n- deploy: `flyctl deploy --dockerfile Dockerfile.\u003cproblem name\u003e --ha=false`;\n  - see problem names under `cmd/` directory and [here](https://protohackers.com/problems).\n\n\u003e [!important]\n\u003e Any uncommitted changes will also be deployed.\n\n## Testing\n\n### Locally\n\n- move to problem directory: `pushd cmd/\u003cproblem name\u003e/`\n- run tests:\n\n  ```console\n  go test -v\n  === RUN   TestProblem\n  --- PASS: TestProblem (0.00s)\n  PASS\n  ok      github.com/usrme/protohackers/cmd/\u003cproblem name\u003e    3.138s\n  ```\n\n- move back to the root of the repository: `popd`;\n- build image: `docker build --tag \u003cproblem name\u003e -f Dockerfile.\u003cproblem name\u003e .`;\n- run container: `docker run -p 5000:5000 \u003cproblem name\u003e`;\n- pass command:\n\n  ```console\n  $ echo \"hello world\" | nc -w1 localhost 5000\n  hello world\n  ```\n\n### Remotely\n\n- [deploy](#deployment);\n- pass command:\n\n  ```console\n  $ echo \"hello world\" | nc -w1 \u003capp name\u003e.fly.dev 5000\n  hello world\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrme%2Fprotohackers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusrme%2Fprotohackers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrme%2Fprotohackers/lists"}