diff --git a/init.el b/init.el index 5c14863..e95b485 100644 --- a/init.el +++ b/init.el @@ -601,7 +601,8 @@ _h_ _l_ _o_k _y_ank db/run-or-hide-shell db/run-or-hide-eshell db/run-or-hide-ansi-term - db/helm-shortcuts)) + db/helm-shortcuts + db/hex-to-ascii)) (use-package db-emacsclient) diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index ad0a2f6..74df966 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -8,6 +8,8 @@ ;;; Code: +(require 'dash) + ;;; application shortcuts @@ -189,6 +191,14 @@ If FILE is not given, prompt for one." (interactive) (message org-clock-current-task)) +(defun db/hex-to-ascii (hex-string) + "Convert HEX-STRING to its ASCII equivalent." + ;; https://stackoverflow.com/questions/12003231/how-do-i-convert-a-string-of-hex-into-ascii-using-elisp + (->> (string-to-list hex-string) + (-partition 2) + (--map (string-to-number (concat it) 16)) + concat)) + ;;; dired @@ -334,7 +344,7 @@ path." helm-source-bookmark-set))) -;;; Other Utilities +;;; Org Utilities (defun db/bank-csv-to-org-table () (interactive)