[Utils] Add little helper to convert hex to ascii

This commit is contained in:
Daniel - 2017-11-16 19:32:56 +01:00
parent 0464bc85a6
commit 654abfe842
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
2 changed files with 13 additions and 2 deletions

View File

@ -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)

View File

@ -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)