{"id":20345279,"url":"https://github.com/sniper00/snowflake-cpp","last_synced_at":"2025-04-12T00:40:32.314Z","repository":{"id":48139323,"uuid":"150596024","full_name":"sniper00/snowflake-cpp","owner":"sniper00","description":"A C++ port of Twitter's Snowflake id generation algorithm ","archived":false,"fork":false,"pushed_at":"2021-04-16T02:43:29.000Z","size":5,"stargazers_count":76,"open_issues_count":0,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T20:21:40.405Z","etag":null,"topics":["generation-algorithm","snowflake-cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","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/sniper00.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}},"created_at":"2018-09-27T14:01:27.000Z","updated_at":"2025-03-10T08:20:28.000Z","dependencies_parsed_at":"2022-08-27T23:11:21.700Z","dependency_job_id":null,"html_url":"https://github.com/sniper00/snowflake-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sniper00%2Fsnowflake-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sniper00%2Fsnowflake-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sniper00%2Fsnowflake-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sniper00%2Fsnowflake-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sniper00","download_url":"https://codeload.github.com/sniper00/snowflake-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501960,"owners_count":21114681,"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":["generation-algorithm","snowflake-cpp"],"created_at":"2024-11-14T22:07:39.627Z","updated_at":"2025-04-12T00:40:32.290Z","avatar_url":"https://github.com/sniper00.png","language":"C++","readme":"# snowflake-cpp\nA C++ port of Twitter's Snowflake id generation algorithm\n\n# Use\n```cpp\n    using snowflake_t = snowflake\u003c1534832906275L\u003e;\n    snowflake_t uuid;\n    uuid.init(1, 1);\n\n    for (int64_t i = 0; i \u003c 10000; ++i)\n    {\n        auto id = uuid.nextid();\n        std::cout \u003c\u003c id \u003c\u003c \"\\n\";\n    }\n```\n\n# Use with lock\n```cpp\n    using snowflake_t = snowflake\u003c1534832906275L,std::mutex\u003e;\n    snowflake_t uuid;\n    uuid.init(1, 1);\n\n    for (int64_t i = 0; i \u003c 10000; ++i)\n    {\n        auto id = uuid.nextid();\n        std::cout \u003c\u003c id \u003c\u003c \"\\n\";\n    }\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsniper00%2Fsnowflake-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsniper00%2Fsnowflake-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsniper00%2Fsnowflake-cpp/lists"}