commit dc2f2e71a3d785f6cc9aa43beb674173f69f777a
parent 3425d7e4135163b30650a497f39b73c9e4402e1a
Author: William Casarin <jb55@jb55.com>
Date: Sun, 5 Dec 2021 22:51:16 -0800
format timestamps anywhere
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/index.gmi b/index.gmi
@@ -8,11 +8,12 @@
# jb55
-=> gemini://jb55.com/log/2021-11-06-airgapped-bitcoin-node-nncp.gmi 2021-11-06 Building an airgapped Bitcoin node with NNCP
-=> gemini://jb55.com/log/2021-11-01-gemini-books.gmi 2021-11-01 Gemini books
-=> gemini://jb55.com/log/2021-10-28-fedwiki-gemini-similarities.gmi 2021-10-28 Federated Wiki and Gemini are more similar than I realized
-=> gemini://jb55.com/log/2021-10-27-gemfedwiki.gmi 2021-10-27 gemfedwiki, a gemini interface to the federated wiki
-=> gemini://jb55.com/log/2021-10-15-simple-gemini-fzf-feed-viewer.gmi 2021-10-15 A simple gemini feed viewer using grep and fzf
+=> gemini://jb55.com/log/2021-12-06-format-timestamps-anywhere.gmi 2021-12-06 - A tool that formats timestamps anywhere
+=> gemini://jb55.com/log/2021-11-06-airgapped-bitcoin-node-nncp.gmi 2021-11-06 - Building an airgapped Bitcoin node with NNCP
+=> gemini://jb55.com/log/2021-11-01-gemini-books.gmi 2021-11-01 - Gemini books
+=> gemini://jb55.com/log/2021-10-28-fedwiki-gemini-similarities.gmi 2021-10-28 - Federated Wiki and Gemini are more similar than I realized
+=> gemini://jb55.com/log/2021-10-27-gemfedwiki.gmi 2021-10-27 - gemfedwiki, a gemini interface to the federated wiki
+=> gemini://jb55.com/log/2021-10-15-simple-gemini-fzf-feed-viewer.gmi 2021-10-15 - A simple gemini feed viewer using grep and fzf
=> gemini://jb55.com/log/2021-09-15-wireguard-ebpf.gmi 2021-09-15 Monitor incoming WireGuard packets with eBPF
=> gemini://jb55.com/log/2021-07-12-protoverse-metaverse-protocol.gmi 2021-07-12 protoverse, a metaverse protocol experiment
diff --git a/log/2021-12-06-format-timestamps-anywhere.gmi b/log/2021-12-06-format-timestamps-anywhere.gmi
@@ -0,0 +1,14 @@
+
+# A tool that formats timestamps anywhere
+
+I'm not sure how common this is for other people, but I constantly find myself looking at unix timestamps in logs of various kinds. Whether it's output from an API, or logs from some program. I found it frustrating that I couldn't just convert these timestamps into human-readable dates automagically.
+
+Well frustration no longer! I decided to write a small C program that detects timestamps in any text stream, and formats them.
+
+=> gemini://jb55.com/projects/datefmt.gmi datefmt
+
+If you find this useful, feel free to package it in your linux distro of choice.
+
+I have a few other programs I have been meaning to properly publish, like another small C program that adds zebra lines to the output of any command. I use this for viewing CSVs in the terminal, when combined with less -S it makes CSVs with long rows a bit more legible. Perhaps I'll save this for a future post.
+
+One new timesaving unix utility a day keeps the doctor away, or so I have been told. I actually have not been told this, and now that I think about it, it's not clear if too many unix utilities is good for you. I suspect too many may drive you mad, but I digress.