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
;; To use, replace these values in your hippie-expand-try-functions-list: | |
;; | |
;; try-expand-dabbrev => try-expand-dabbrev-closest-first | |
;; try-expand-line => try-expand-line-closest-first | |
;; | |
(defvar he-search-loc-backward (make-marker)) | |
(defvar he-search-loc-forward (make-marker)) | |
(defun try-expand-dabbrev-closest-first (old) |
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
(add-hook | |
'find-file-hook | |
(lambda () | |
(when (string-match-p "projects/my-project" (buffer-file-name)) | |
(setq js2-additional-externs '("my" "additional" "externs"))))) |
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 's) | |
(require 'cl) | |
(require 'assoc) | |
(defvar kmbot--file ".kmbot-memory.el") | |
(defvar kmbot--definitions nil) | |
(defun kmbot--dump-list (list-symbol) | |
"Insert (setq LIST-SYMBOL LIST-VALUE) to current buffer." | |
(let ((value (symbol-value list-symbol))) |
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
;; Use lambda for anonymous functions | |
(font-lock-add-keywords | |
'js2-mode `(("\\(function\\) *(" | |
(0 (progn (compose-region (match-beginning 1) | |
(match-end 1) "\u0192") | |
nil))))) |
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
;; Keep emacs Custom-settings in separate file | |
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) | |
(load custom-file) |
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
(defvar adv-destination-room-overlay nil) | |
(make-variable-buffer-local 'adv-destination-room-overlay) | |
(defun adv-fontify-destination-room (s) | |
(set-text-properties | |
0 (length s) | |
`(face (:foreground ,(format "#%02x%02x%02x" 30 30 30))) | |
s) | |
s) |
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
printf "\n\033[34moiiku-attendants-app: \033[0m" | |
cd oiiku-attendants-app && git status | |
printf "\n\033[34moiiku-central-api: \033[0m" | |
cd ../oiiku-central-api && git status | |
printf "\n\033[34moiiku-dev-tools: \033[0m" | |
cd ../oiiku-dev-tools && git status | |
printf "\n\033[34moiiku-event-admin: \033[0m" | |
cd ../oiiku-event-admin && git status | |
printf "\n\033[34moiiku-grails-starterkit: \033[0m" | |
cd ../oiiku-grails-starterkit && git status |
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 'flycheck) | |
(defun magnars/adjust-flycheck-automatic-syntax-eagerness () | |
"Adjust how often we check for errors based on if there are any. | |
This lets us fix any errors as quickly as possible, but in a | |
clean buffer we're an order of magnitude laxer about checking." | |
(setq flycheck-idle-change-delay | |
(if flycheck-current-errors 0.3 3.0))) |
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
(function () { | |
buster.testCase("dom", { | |
"assert.called fails in IE8, this is the minimal case": function () { | |
var spy = this.spy(); | |
spy(document.createElement("input")); | |
assert.called(spy); | |
} | |
}); |
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
[refute.calledWith] Expected function updateValidationError() {} not to be called with arguments 'dummy value' | |
updateValidationError({ completeCallback: function () {}, editCallback: function () {}, id: 1, onComplete: function () {}, onEdit: function () {} }) |