Show HN: A simple fortune cookie service

3 points by dicho ↗ HN
I have setup a very simple service which outputs a random "fortune-cookie" text every time the url is accessed. It can be accessed via web browser, which will present proper html, and it can be also reached via `curl`, which will receive plain text.

https://coo.kie.space/ will present standard non-offensive fortune cookies;

https://coo.kie.space/a may present any fortune cookie, offensive or not;

https://coo.kie.space/o will present only offensive fortune cookies.

I appreciate any feedback, criticism and/or suggestions.

P.S.: I did this just for fun; although it seems pointless at first, think of environments where you can't install fortunes or don't have the privilege to execute it: if you can `curl`, you are good to go.

edit: now with https working.

3 comments

[ 2.9 ms ] story [ 14.8 ms ] thread
Why not implement it as a QOTD service?

https://en.wikipedia.org/wiki/QOTD

This looks nice... I didn't even know about this type of service. Perhaps I can implement it for fun. I'll let you know!

For now, however, there are some new tricks: fortune over DNS. Try `dig +short txt nice.coo.kie.space` and see what happens (`host -t txt nice.coo.kie.space` works, too, but the output has some unwanted verbosity). URLs all.coo.kie.space and off.coo.kie.space also work with these commands.

(comment deleted)