{"id":28043028,"url":"https://github.com/beer-ops/octocat-in-c","last_synced_at":"2025-10-13T05:35:03.840Z","repository":{"id":291984000,"uuid":"300237648","full_name":"Beer-Ops/octocat-in-c","owner":"Beer-Ops","description":"GitHub Code Spaces demo with a more complex C based environment","archived":false,"fork":false,"pushed_at":"2020-10-04T19:01:28.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-11T15:46:15.987Z","etag":null,"topics":["c","codespaces","conan","cpp","octoberfest","python","vscode","zenofgithub"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/Beer-Ops.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":"2020-10-01T10:24:03.000Z","updated_at":"2025-05-06T01:54:34.000Z","dependencies_parsed_at":"2025-05-11T15:36:25.102Z","dependency_job_id":null,"html_url":"https://github.com/Beer-Ops/octocat-in-c","commit_stats":null,"previous_names":["beer-ops/octocat-in-c"],"tags_count":0,"template":true,"template_full_name":"dassencio/codespaces-demo-cpp","purl":"pkg:github/Beer-Ops/octocat-in-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beer-Ops%2Foctocat-in-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beer-Ops%2Foctocat-in-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beer-Ops%2Foctocat-in-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beer-Ops%2Foctocat-in-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beer-Ops","download_url":"https://codeload.github.com/Beer-Ops/octocat-in-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beer-Ops%2Foctocat-in-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013705,"owners_count":26085393,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":["c","codespaces","conan","cpp","octoberfest","python","vscode","zenofgithub"],"created_at":"2025-05-11T15:36:20.684Z","updated_at":"2025-10-13T05:35:03.835Z","avatar_url":"https://github.com/Beer-Ops.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nThis repository is an example of how a [codespace](https://github.com/features/codespaces) can be\nset up for the development of a C/C++ application.\n\nSetting up a development environment for C/C++ applications is a notoriously difficult task. Working on a\ncomplex project may involve installing dozens of system packages, fetching and building external\nlibraries using different build systems, and defining various environment variables so the\ndesired output binaries can be generated. In certain cases, doing all that work may take days, if\nnot weeks, producing a great deal of frustration among developers, especially those joining a new\nteam or organization.\n\nA well-designed codespace addresses this problem head-on: it is the combination of (1) a Docker\ncontainer with all the necessary system packages, libraries etc. already pre-installed and (2) an\neditor configured with the optimal settings and plugins which allow a developer to start\n working on the project's code immediatelly. No manual setup needed. No wrestling with the\ndevelopment environment. No pain!\n\nThe definition of a codespace (Docker container + editor configuration) is done via code, and that\ncode resides in the project's repository. Each project will therefore have its own dedicated\ncodespace definition, allowing for maximal flexibility since different projects will have different\nrequirements. Simultaneously working on multiple projects can be done painlessly with codespaces:\nsimply start the codespace for each project and start doing valuable work right away.\n\n# Usage instructions\n\nThis repository contains the code for a C application taken from\n[jonico/zenofgithub](https://github.com/jonico/zenofgithub) (see the\n[`src`](https://github.com/dassencio/codespaces-demo-cpp/tree/main/src) directory). If you look at\nthat project's [`README`](https://github.com/dassencio/codespaces-demo-cpp/blob/main/src/README.md),\nyou will see that there are multiple steps required to set it up, including installing\n[`conan`](https://conan.io/), adding an external `conan` repository and running extra commands to\nconfigure the build system (`cmake`). Additional steps (not mentioned in the `README`) may also be\nnecessary depending on what is already installed in your system. For instance, you may have to\ninstall `cmake`, or have to install `python` and `pip` before installing `conan`.\n\nWhat if you did not have to do any of that to make changes in the code and test them? Well, you do\nnot! Simply click `Code` \u003e `Open with Codespaces` \u003e `New codespace` to enter a browser-based\ndevelopment environment containing everything you need to quickly get your work done. Even the build\nsystem configuration is done automatically for you, so you will not need to run any `cmake`\ncommands.\n\nTo compile the application, open a terminal (menu icon \u003e `Terminal` \u003e `New\nTerminal`) and run the following commands:\n\n```\ncd build\nmake\ncd bin\n./zenofgithub\n```\n\nIf you have made no changes to the source code, you will see the following output:\n\n```\nYou're not in a git repo so the octocat will stay silent.\nCreate a git repo and the Zen of GitHub will be revealed to you.\n```\n\nWell, it seems we need to be inside a `git` repository to have the Octocat speak to us. We can create a `git` repository right at the `bin` directory and try again:\n\n```\ngit init\n./zenofgithub\n```\n\nThe Octocat will now share its wisdom with us:\n\n```\n\n               MMM.           .MMM\n               MMMMMMMMMMMMMMMMMMM\n               MMMMMMMMMMMMMMMMMMM      _______________________________________\n              MMMMMMMMMMMMMMMMMMMMM    |                                       |\n             MMMMMMMMMMMMMMMMMMMMMMM   | Non-blocking is better than blocking. |\n            MMMMMMMMMMMMMMMMMMMMMMMM   |_   ___________________________________|\n            MMMM::- -:::::::- -::MMMM    |/\n             MM~:~ 00~:::::~ 00~:~MM\n        .. MMMMM::.00:::+:::.00::MMMMM ..\n              .MM::::: ._. :::::MM.\n                 MMMM;:::::;MMMM\n          -MM        MMMMMMM\n          ^  M+     MMMMMMMMM\n              MMMMMMM MM MM MM\n                   MM MM MM MM\n                   MM MM MM MM\n                .~~MM~MM~MM~MM~~.\n             ~~~~MM:~MM~~~MM~:MM~~~~\n            ~~~~~~==~==~~~==~==~~~~~~\n             ~~~~~~==~==~==~==~~~~~~\n                 :~==~==~==~==~~\n```\n\nNow try making changes to\n[`src/zenofgithub.c`](https://github.com/dassencio/codespaces-demo-cpp/blob/main/src/zenofgithub.c),\ncompiling the application again using `make` (inside `build`) and running it one more time. Did you\nrealize what just happened? You made changes to the source code and tested them, without _any_ setup\neffort needed!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeer-ops%2Foctocat-in-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeer-ops%2Foctocat-in-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeer-ops%2Foctocat-in-c/lists"}