Last active
April 16, 2019 14:35
-
-
Save appkr/f9ae88f7edc4c14c4c0b9f49fec78bf2 to your computer and use it in GitHub Desktop.
UUID, Random String Generate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.UUID; | |
| UUID.randomUUID(); | |
| Integer.parseInt("8654", 16); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // psysh in your shell | |
| // @see https://github.com/appkr/dotfiles/commit/7651951140c51cbb6b83e588a799c2eb2ce6f9d3 | |
| use Ramsey\Uuid\Uuid; | |
| (string)Uuid::uuid4(); | |
| (int)0x8654; | |
| str_random(30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # "python" in your shell | |
| import uuid | |
| uuid.uuid4() | |
| int(0x8654) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # "irb" in your shell | |
| require 'securerandom' | |
| uuid = SecureRandom.uuid | |
| 0x8654.to_i | |
| SecureRandom.alphanumeric(30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment