Coder Social home page Coder Social logo

dizgarmoniya / simple_uuid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cassandra-rb/simple_uuid

0.0 2.0 0.0 64 KB

A simple uuid library for ruby

Home Page: http://blog.evanweaver.com/files/doc/fauna/simple_uuid/files/README_rdoc.html

License: Other

simple_uuid's Introduction

simple_uuid

Simple, scalable UUID generation.

License

Copyright 2009-2010 Twitter, Inc. See included LICENSE file.

Features

  • pure-Ruby

  • no MAC address scraping

  • no file-based locking

This library implements UUID format version 1, as specified in RFC 4122, with jitter in place of the mac address and sequence counter.

Installation

Install the gem:

sudo gem install simple_uuid

Usage

# Creating and getting a timestamp from the UUID
uuid = SimpleUUID::UUID.new => <UUID#2278170300  .... >
uuid.to_time => Thu Aug 18 19:15:16 -0400 2011

# Given raw bytes from a source such as cassandra (using bytes from an existing UUID as an example)
bytes = SimpleUUID::UUID.new.bytes
SimpleUUID::UUID.to_time(bytes) => Thu Aug 18 19:15:16 -0400 2011

Reporting problems

The support forum is here.

Patches and contributions are very welcome.

simple_uuid's People

Contributors

ryanking avatar jarib avatar aanand avatar amanelis avatar kbrock avatar mikebaldry avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.