I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?
Maybe a JS App which is made completely out of third party APIs, without anything self-hosted? Not discussing wether this is a good idea or not, though... I was surprised to see that there is no "built-in" mechanism in JS to generate a GUID. As a C# dev, I'm used to Guid.NewGuid()
Show HN: Givemeguid.com – CLI/curl friendly GUIDs
11–20 of 51 posts
Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#12I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?
Maybe a JS App which is made completely out of third party APIs, without anything self-hosted? Not discussing wether this is a good idea or not, though... I was surprised to see that there is no "built-in" mechanism in JS to generate a GUID. As a C# dev, I'm used to Guid.NewGuid()
Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#13Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#14cat /proc/sys/kernel/random/uuid
Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#15I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?
If you're writing some kind of application, pretty much every language/framework can generate UUIDs, and even if yours doesn't, just generate a 128-bit number, stamp the v4 UUID bits into it, reformat it, and you're done. Calling out to a 3rd-party service is insane for that use case anyway.
Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#16If you use Linux: cat /proc/sys/kernel/random/uuid
cat: /proc/sys/kernel/random/uuid: No such file or directory
Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#17Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#18Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs
#19uuidgen is one. My personal favorite is this snippet.
$ id=$(openssl rand 1000 | openssl sha1) && printf "%s${id:0:8}\n"