This file contains hidden or 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
(defvar random-pick-start "[[[PICK_START") | |
(defvar random-pick-end "]]]PICK_END") | |
(defun random-pick-0 (item-line-maker) | |
(let* ((line-start-num | |
(save-excursion | |
(goto-char (point-min)) | |
(search-forward random-pick-start) | |
(forward-line) | |
;; (thing-at-point 'line) | |
(line-number-at-pos))) |
This file contains hidden or 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
; thanks for https://gist.github.com/inouetmhr/4116307 | |
(defun base64-to-base64url (str) | |
(setq str (replace-regexp-in-string "=+$" "" str)) | |
(setq str (replace-regexp-in-string "+" "-" str)) | |
(setq str (replace-regexp-in-string "/" "_" str))) | |
(defun base64url-to-base64 (str) | |
(setq str (replace-regexp-in-string "-" "+" str)) | |
(setq str (replace-regexp-in-string "_" "/" str)) | |
(let ((mod (% (length str) 4))) |