Last active
December 28, 2015 20:29
-
-
Save bdargan/7557930 to your computer and use it in GitHub Desktop.
stuff, like curl and date utils
find a number, that looks like a recent number of secs since the epoch and make it human readable
This file contains 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
(defun epoch-to-iso () | |
(interactive) | |
(re-search-forward "\\([0-9]\\{10,13\\}\\)") | |
(goto-char (match-beginning 0)) | |
(replace-match (format-time-string "%Y-%m-%d" (seconds-to-time (/ (string-to-int (match-string 1)) 1000)))) | |
) | |
(defun curl-something (begin end) | |
(interactive "r") | |
(shell-command (concat "curl " (buffer-substring begin end)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment