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
(defn update-in* [m path f] | |
"Like update-in, but can map over lists by nesting paths." | |
(if (vector? (last path)) | |
(let [nested-path (last path) | |
this-path (drop-last path)] | |
(if (empty? nested-path) | |
(update-in m this-path (partial map f)) | |
(update-in m this-path (partial map #(update-in* % nested-path f))))) | |
(update-in m path f))) |
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
Importing endpoints from https://stage.payment.schibsted.no/api/2/endpoints | |
-------------------------------------------------------------------------------- | |
Changed endpoints: | |
- signup_jwt | |
- user/{userId}/preferences/payment | |
- product/{productId}/children | |
- user/{userId} | |
- logins/{userId} | |
- discount | |
- search/users |
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
(function (L) { | |
"use strict"; | |
describe("lms.events 'first-results'", function () { | |
var eventHub; | |
beforeEach(function () { | |
eventHub = FINN.eventHub.create(); | |
L.setupFirstResultsEvent(eventHub); | |
}); |
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
;; shorthand for interactive lambdas | |
(defmacro λ (&rest body) | |
`(lambda () | |
(interactive) | |
,@body)) | |
(global-set-key (kbd "s-l") (λ (insert "\u03bb"))) |
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
(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 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
[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 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
(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 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
(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 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
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 |