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
| ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; Win config stack | |
| ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| (defvar winstack-stack '() | |
| "A Stack holding window configurations. | |
| Use `winstack-push' and | |
| `winstack-pop' to modify it.") | |
| (defun winstack-push() | |
| "Push the current window configuration onto `winstack-stack'." |
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
| (flycheck-define-checker omnisharp | |
| "Flycheck checker for omnisharp" | |
| :command ("curl" | |
| "--silent" "-H" | |
| "Content-type: application/json" | |
| "--data-binary" | |
| (eval (concat "@" (omnisharp--write-json-params-to-tmp-file | |
| omnisharp--windows-curl-tmp-file-path | |
| (json-encode (omnisharp--get-common-params))))) ;; do the work here, and get the path |
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
| (defun spam-matt () | |
| (interactive) | |
| (let ((buffer (current-buffer))) | |
| (jabber-chat-with (jabber-read-account) "matt.gritters@urgot") | |
| (end-of-buffer) | |
| (insert "lols") | |
| (jabber-chat-buffer-send) | |
| (switch-to-buffer buffer))) | |
| (global-set-key (kbd "C-c C-m") 'spam-matt) |
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
| description (begin end &optional description private callback) | |
| "Post the current region as a new paste at gist.github.com | |
| Copies the URL into the kill ring. | |
| With a prefix argument, makes a private paste." | |
| (interactive "r\nsGist Description: \nP") | |
| (let* ((file (or (buff |
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
| (dired-sort-R-check switches) | |
| (setq dired-actual-switches switches) | |
| (dired-sort-set-mode-line) | |
| (or no-revert (revert-buffer))) |
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
| (message "Paste created: %s" location) | |
| (when gist-view-gist | |
| (browse-url location)) | |
| (kill-new location))) | |
| ;;;###autoload | |
| (defun gist-region-private (begin end) | |
| "Post the current region as a new private paste at gist.github.com |
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
| les public description) | |
| stub | |
| (setq files (gh-object-list-read (oref stub file-cls) | |
| (gh-read data 'files)) | |
| public (gh-read data 'public) | |
| descrip |
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
| (defmacro value-bound-lambda (args symbols &rest body) | |
| "Returns a lambda expression with ARGS, where each symbol in SYMBOLS is | |
| available for use and is bound to it's value at creation. | |
| Symbols needs to be a list of variables or functions available globally." | |
| (declare (indent defun)) | |
| (let ((vars (remove-if-not 'boundp symbols)) | |
| (funcs (remove-if-not 'functionp symbols))) | |
| `(lambda ,args | |
| (let ,(mapcar (lambda (sym) (list sym (symbol-value sym))) vars) |
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
| (defmacro value-bound-lambda (symbols &rest body) | |
| (declare (indent defun)) | |
| (let ((vars (remove-if-not 'boundp symbols)) | |
| (funcs (remove-if-not 'functionp symbols))) | |
| `(lambda () | |
| (let ,(mapcar (lambda (sym) (list sym (symbol-value sym))) vars) | |
| ,@(mapcar (lambda (sym) `(fset ',sym ,(symbol-function sym))) funcs) | |
| ,@body)))) | |
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
| (defun sendtext:escape-text(s): | |
| (with-temp-buffer | |
| (insert s) | |
| (replace-string "\\" "\\\\" nil (point-min) (point-max)) | |
| (replace-string "\"" "\\\"" nil (point-min) (point-max)) | |
| (buffer-substring-no-properties (point-min) (point-max)))) | |
| (defun sendtext:send-iterm2(beg end) | |
| (interactive "r") | |
| (let ((text (buffer-substring-no-properties beg end))) |