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
;;; Major mode for uLisp | |
;;; M-x ulisp-connect (or C-u M-x ulisp-connect to change the default serial device). | |
;;; | |
;;; C-x C-e eval last sexp | |
;;; C-c C-e eval defun | |
;;; C-c C-k eval buffer | |
;;; C-c C-k eval region | |
;;; C-c C-t terminate running program | |
(require 'inf-lisp) |
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 kwarks--org-babel-get-result () | |
"Get the result of the current source block." | |
(let ((location (org-babel-where-is-src-block-result))) | |
(when location | |
(save-excursion | |
(goto-char location) | |
(when (looking-at (concat org-babel-result-regexp ".*$")) | |
(buffer-substring | |
(save-excursion | |
(skip-chars-backward " \r\t\n") |
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
(require 'json) | |
(defvar tree-mode-map | |
(let ((map (make-sparse-keymap))) | |
(define-key map "v" 'kwarks/tree-view-file) | |
(define-key map "o" 'kwarks/tree-find-file) | |
(define-key map (kbd "RET") 'kwarks/tree-find-file) | |
(define-key map "c" 'kwarks/tree-copy-node-path) | |
(define-key map "s" 'kwarks/tree-subtree) | |
(define-key map "r" 'kwarks/tree-reload) |
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 helm--virtualbox-vms () | |
(mapcar (lambda (str) (string-trim (car (split-string str " ")) "\"" "\"")) | |
(split-string (trim (shell-command-to-string "VBoxManage list vms")) "\n"))) | |
(defun helm--virtualbox-sources () | |
`((name . "Virtual Box") | |
(candidates . ,(helm--virtualbox-vms)) | |
(action . (("Status" . (lambda (candidate) | |
(let ((vm-info (shell-command-to-string (format "VBoxManage showvminfo \"%s\"" candidate)))) | |
(save-match-data |
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
(require 'json) | |
(defun canadapost-status (tracking-number) | |
"Check parcel location and status from Canada Post" | |
(interactive "MTracking number: ") | |
(with-temp-buffer | |
(url-insert-file-contents | |
(format "https://www.canadapost.ca/trackweb/rs/track/json/package?pins=%s" tracking-number)) | |
(let* ((json-object-type 'hash-table) | |
(json-array-type 'list) |
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 org-display-decrypted-entry () | |
"Display decrypted content of the current headline in a new read-only buffer." | |
(interactive) | |
(require 'epg) | |
(unless (org-before-first-heading-p) | |
(org-with-wide-buffer | |
(org-back-to-heading t) | |
(let ((heading-point (point)) | |
(heading-was-invisible-p | |
(save-excursion |
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
;; hash-pass http://hashapass.com/ | |
(defvar hash-pass-password-wait-time "30 sec" | |
"The default period to wait before erasing the password from the clipboard. | |
Must be compatible with `run-at-time'.") | |
(defun string->clipboard (string) | |
"Copy STRING to system clipboard." | |
(funcall interprogram-cut-function string)) | |
(defun hash-pass () |