<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.8.0</version>
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
| (use 'clojure.pprint) | |
| (import 'java.lang.Thread) | |
| (-> (Thread/currentThread) (.getContextClassLoader) (.getURLs) (seq) (pprint)) |
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
| ;; put this into profiles.clj in ~/.lein folder | |
| {:user {:jvm-opts ^:replace ["-Xmx3G"] | |
| :plugins [[cider/cider-nrepl "0.19.0-SNAPSHOT"] | |
| [refactor-nrepl "2.4.0"] | |
| [lein-ancient "0.6.15"] | |
| [jonase/eastwood "0.3.3"] | |
| [lein-pprint "1.2.0"] | |
| [lein-try "0.4.3"] | |
| [lein-cloverage "1.0.13"]] | |
| :middleware [cider-nrepl.plugin/middleware |
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
| package nl.avisi.jira; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.DisposableBean; | |
| import org.springframework.beans.factory.InitializingBean; | |
| import com.atlassian.jira.component.ComponentAccessor; | |
| import clojure.java.api.Clojure; |
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
| ;; | |
| ;; NS CHEATSHEET | |
| ;; | |
| ;; * :require makes functions available with a namespace prefix | |
| ;; and optionally can refer functions to the current ns. | |
| ;; | |
| ;; * :import refers Java classes to the current namespace. | |
| ;; | |
| ;; * :refer-clojure affects availability of built-in (clojure.core) | |
| ;; functions. |
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 subtask+ [] | |
| (js/Promise. (fn [resolve] | |
| (js/setTimeout #(resolve :success) 5000))) | |
| ) | |
| (defn main [] | |
| (-> (subtask+) | |
| (.then (fn [result] (println "Got " result) )) | |
| (.catch (fn [e] (println "Shit happend! " e )) ) | |
| )) |
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
| (->> | |
| '(1 2 3 4) | |
| (map #(Math/pow % 2)) | |
| (partition 2) | |
| (map println) | |
| dorun | |
| ) |
-
Установить VirtualBox
-
Скачать docker machine, прописать в path
-
Выполнить
docker-machine create -d virtualbox --virtualbox-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso --virtualbox-memory "2048" VM4DOCKERNAME(VM4DOCKERNAME as you wish) -
Проверить докер-vm
docker-machine ls -
Работа с docker
5.1. Заходим в докер-vm
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
| (let [q 6 | |
| n 10] | |
| (/ (* q | |
| (- 1 | |
| (js/Math.pow q n))) | |
| (- 1 q) | |
| ) | |
| ) |