Giter Site home page Giter Site logo

uuid's Introduction

uuid

A command-line tool for generating universally unique identifiers.

Requirements

uuid is written in Elixir and will require Elixir > 1.10 and mix if installed locally.

Installation

Docker

Run docker build -t uuid . Verify uuid is installed properly by running docker run -it --rm uuid --help.

Local

Start by cloning the repo at https://github.com/cmmorrow/uuid.

Next, from the command-line, run mix local.hex to update Hex. Run mix deps.get to download the necessary dependencies. Finally, run mix escript.build to build the uuid binary. Verify uuid is installed properly by running ./uuid --help.

Usage

Usage: uuid [1|3|4|5] [--url|--dns|--oid|--x500 name] [--hex|--urn]

  A command-line tool for generating universal unique identifiers (uuids).

  1 - Generate a version 1 uuid based on MAC address. 
  3 - Generate a version 3 uuid based on the MD5 hash of ARG.
  4 - Generate a version 4 uuid based on randomly generated bytes.
  5 - Generate a version 5 uuid based on the SHA1 hash of ARG.

  If a version number isn't provided, the default is version 4.

  Options:
    --url    A uniform resource locator.
    --dns    A fully qualified domain name.
    --oid    An object identifier.
    --x500   A x.500 distinguished name.

    --hex    Provides the uuid in hexidecimal format without the "-"s.
    --urn    Provides the uuid in the uniform resource name namespace.

Examples

> uuid
a88beae3-2989-4e80-938a-6d3bd0848189

> uuid 1
48dd6b58-4768-11ec-8aeb-xxxxxxxxxxxx

> uuid 3 --dns elixir-lang.org
8193d89e-bc38-3c0c-aca8-a9dcc3493799

> uuid 3 --dns elixir-lang.org --hex
8193d89ebc383c0caca8a9dcc3493799

> uuid 3 --url elixir-lang.org --urn
urn:uuid:c2f6bfdf-0011-3df9-a67f-faf9132e0185

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.