Re:Show HN: A programmable tooltip on Mac OS
by iandev on Monday April 20, 2020 @11:11AM
(#22924494)
Also worth noting that you can pipe the result to `pbcopy` to put it in your clipboard. Super useful if you haven't seen it before.
$ date -r 1577733633 | pbcopy
Re:Show HN: A programmable tooltip on Mac OS
by sportsaw on Monday April 20, 2020 @07:10PM
(#22929899)
I think the example was silly, but think about finding the epoch in, say, a log file. With this system you could just click and see the human readable. With the date command you'd have to switch to terminal, type "date -r", paste, enter.
date -r 1577733633
date: 1577733633: No such file or directory
... -r, --reference=FILE
display the last modification time of FILE
...Is OSX's date command different from Linux?
Found it, for GNU it's `date -d @1577733633`
Re:Show HN: A programmable tooltip on Mac OS
by _nhynes on Monday April 20, 2020 @11:10AM
(#22924486)
macOS has BSD date and Linux ships with GNU.
Yes! I was doing that for a while with a command-line tool. I couldn't make up my mind which way was faster. They were both required some sort of motor skill (e.g. switch to terminal, paste, enter) to perform the flows quickly.
I use the builtin `date` utility for this specific task, instead of querying another webpage to translate it.