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
(ns omnitech.shims) | |
(defn- closest [selector] | |
(this-as node | |
(let [node-list (.querySelectorAll js/document selector) | |
all (mapv #(aget node-list %) (range 0 (.-length node-list)))] | |
(loop [node node] | |
(let [parent (.-parentNode node)] | |
(if (some #(= parent %) all) | |
parent |
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
(ns user | |
(:require [clojure.core.async :as async])) | |
(defn now-millis [] | |
(System/currentTimeMillis)) | |
(defn throttled-chan | |
"Returns a channel that will throttle attempts to take items according to the rate-limits. | |
rate-limits should be a sequence of pairs of integers. The first item in each pair | |
is describing how many items is possible to take, at most, from the input for the interval |
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
(defmulti foo (fn [x & _] x)) | |
(defmethod foo :sum [_ & args] (apply + args)) | |
(apply foo (list* :sum (range 10))) ;; => ok | |
(apply foo (list* :sum (range 25))) ;; => Invalid arity exception |
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
{:paths ["."]} |
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
{:deps {org.clojure/clojure {:mvn/version "1.10.1"}} | |
:paths ["."]} |
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
1+2 |
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
# clj -Sdeps '{:deps {amazonica {:mvn/version "0.3.142" :exclusions [com.amazonaws/aws-java-sdk com.amazonaws/amazon-kinesis-client]} com.amazonaws/aws-java-sdk-s3 {:mvn/version "1.11.475"} com.amazonaws/aws-java-sdk-core {:mvn/version "1.11.475"}}}' -Stree | |
org.clojure/clojure 1.10.0 | |
org.clojure/core.specs.alpha 0.2.44 | |
org.clojure/spec.alpha 0.2.176 | |
org.clojure/tools.trace 0.7.10 | |
com.amazonaws/aws-java-sdk-core 1.11.475 | |
com.fasterxml.jackson.core/jackson-databind 2.6.7.2 | |
com.fasterxml.jackson.core/jackson-core 2.6.7 | |
com.fasterxml.jackson.core/jackson-annotations 2.6.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
### Keybase proof | |
I hereby claim: | |
* I am delaguardo on github. | |
* I am delaguardo (https://keybase.io/delaguardo) on keybase. | |
* I have a public key ASCuGGRAQF2wfy-ooyMNloSDB33IEfsyI68GpEhU7tIpZAo | |
To claim this, I am signing this object: |
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
;; Enable ligatures without prettify-symbols | |
(provide 'add-pragmatapro-symbol-keywords) | |
(defconst pragmatapro-fontlock-keywords-alist | |
(mapcar (lambda (regex-char-pair) | |
`(,(car regex-char-pair) | |
(0 (prog1 () | |
(compose-region (match-beginning 1) | |
(match-end 1) |
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
Local: master ~/Projects/aviasales/jr-content/ | |
Remote: master @ origin ([email protected]:KosyanMedia/jr-content.git) | |
Head: 7904c31 Add method for fetching weather data with average computation | |
Stashes: | |
0: WIP on master: 1e56a77 Add cheapest_flights property for cities | |
1: WIP on master: 1330763 Fix encoding in currencies | |
2: On master: 123 | |
3: On master: Snapshot taken at 2015-04-28 17:19:04 | |
4: WIP on master: a1dcf52 cheapest_domestic_internationl_flights for airline |
NewerOlder