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
;; shorthand for interactive lambdas | |
(defmacro λ (&rest body) | |
`(lambda () | |
(interactive) | |
,@body)) | |
(global-set-key (kbd "s-l") (λ (insert "\u03bb"))) |
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 () { | |
"use strict"; | |
buster.testCase("refute.calledWith fails badly in IE8", { | |
"it's just crazy dude": function () { | |
var spy = this.spy(); | |
spy("'actual-value'"); | |
refute.calledWith(spy, "'test-value'"); | |
} | |
}); |
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 () {} }) |
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
(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
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
(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
;; 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
;; 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
(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))) |