{"id":15957086,"url":"https://github.com/mamantoha/snowflake","last_synced_at":"2025-10-20T02:21:15.512Z","repository":{"id":224349023,"uuid":"763055455","full_name":"mamantoha/snowflake","owner":"mamantoha","description":"Snowflake ID generator implementation in Crystal programming language","archived":false,"fork":false,"pushed_at":"2024-12-02T09:47:25.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T09:34:36.988Z","etag":null,"topics":["crystal","snowflake"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/mamantoha.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}},"created_at":"2024-02-25T12:50:50.000Z","updated_at":"2024-12-02T09:47:28.000Z","dependencies_parsed_at":"2024-12-02T18:33:42.847Z","dependency_job_id":null,"html_url":"https://github.com/mamantoha/snowflake","commit_stats":null,"previous_names":["mamantoha/snowflake"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mamantoha/snowflake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fsnowflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fsnowflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fsnowflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fsnowflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/snowflake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fsnowflake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279981029,"owners_count":26254232,"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-20T02:00:06.978Z","response_time":62,"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":["crystal","snowflake"],"created_at":"2024-10-07T13:40:31.509Z","updated_at":"2025-10-20T02:21:15.490Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snowflake\n\n[![Crystal CI](https://github.com/mamantoha/snowflake/actions/workflows/crystal.yml/badge.svg)](https://github.com/mamantoha/snowflake/actions/workflows/crystal.yml)\n[![GitHub release](https://img.shields.io/github/release/mamantoha/snowflake.svg)](https://github.com/mamantoha/snowflake/releases)\n[![License](https://img.shields.io/github/license/mamantoha/snowflake.svg)](https://github.com/mamantoha/snowflake/blob/main/LICENSE)\n\nSnowflake ID generator implementation in Crystal programming language, which is designed to generate unique,\ntime-based identifiers using a 64-bit structure. These identifiers consist of a timestamp component,\na machine or process ID, and a sequence number to ensure uniqueness within the same millisecond.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     snowflake:\n       github: mamantoha/snowflake\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"snowflake\"\n\nmachine_id = 1_u64 # Assign a unique machine/process ID\ngenerator = Snowflake.new(machine_id)\nsnowflake_id = generator.generate_id\nputs snowflake_id\n\n# To convert a Snowflake ID back to a UTC timestamp\nutc_time = Snowflake.id_to_utc(snowflake_id)\nputs utc_time\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/snowflake/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anton Maminov](https://github.com/your-github-user) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fsnowflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fsnowflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fsnowflake/lists"}