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 jline3.demo | |
(:gen-class) | |
(:import (org.jline.terminal TerminalBuilder Terminal$SignalHandler Terminal) | |
(org.jline.reader LineReaderBuilder LineReader LineReader$Option) | |
(org.jline.reader.impl LineReaderImpl) | |
(org.jline.utils InfoCmp$Capability))) | |
(defn new-terminal | |
"creates new JLine3 Terminal. | |
returns terminal 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# ******************************************************** | |
# on Mac run: | |
# vagrant plugin install vagrant-vbguest | |
# ******************************************************** | |
Vagrant.configure("2") do |config| |
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.0"} | |
org.bouncycastle/bcprov-jdk15on {:mvn/version "1.61"}}} |
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.0"} | |
com.taoensso/nippy {:mvn/version "2.14.0"} | |
org.apache.commons/commons-compress {:mvn/version "1.18"}}} |
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 a) | |
(defrecord Tree [node-value left-tree right-tree]) | |
(defn insert [tree new-value] | |
(let [{:keys [node-value left-tree right-tree]} tree] | |
(cond | |
(nil? node-value) (Tree. new-value nil nil) | |
(< new-value node-value) (Tree. node-value (insert left-tree new-value) right-tree) | |
(> new-value node-value) (Tree. node-value left-tree (insert right-tree new-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
(defn doc-template | |
"Description: | |
Generates doc string template for given `args` argument list. | |
Arguments: | |
**`desc`** - _String_ with description what function do. | |
**`args`** - _vector_ of symbols (argument names). | |
**`return`** - _String_ with description what function return. |
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
(defproject my/project "0.1.0" | |
:repositories [["spring" {:url "https://repo.spring.io/plugins-release/"}]] | |
:plugins [[lein-tools-deps "0.4.5"]] | |
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn] | |
:lein-tools-deps/config {:config-files [:install :user :project]} | |
:main ^:skip-aot ams.core |
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
(defn convert-deps->lein | |
"convert dependencies map from deps.edn to leiningen :dependencies vector. | |
`deps-map` should be quoted map. Example: '{org.clojure/clojure {:mvn/version \"1.10.1\"}}" | |
[deps-map] | |
(into [] | |
(sort-by first | |
(for [item deps-map] | |
[(first item) (:mvn/version (second item))])))) | |
(def m '{org.clojure/clojure {:mvn/version "1.10.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
;;deps.edn | |
{:deps { :xr-test {:extra-deps { com.cognitect/transcriptor {:mvn/version "0.1.5"}} | |
:extra-paths ["test" "test/resources"] | |
:main-opts ["--main" "repl-runner"]}}} | |
;; test/repl_runner.clj | |
(ns repl-runner |
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
(defn run-once-init-db! | |
"# create db and users. | |
this fn should be run once from init stage of migratus. | |
* Params: no params. | |
* Warning: verita.config must be already started. | |
* Returns: | |
Return result of migratus/init." |
OlderNewer