<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
| ;; | |
| ;; 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
| 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
| ;; 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
| (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
| => (clojure.core.server/start-server {:name "debug connection" :port 5555 :accept 'clojure.core.server/repl}) | |
| #object[java.net.ServerSocket 0x631883f0 "ServerSocket[addr=localhost/127.0.0.1,localport=5555]"] |
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
| XPath ::= Expr | |
| ParamList ::= Param ("," Param)* | |
| Param ::= "$" EQName TypeDeclaration? | |
| FunctionBody ::= EnclosedExpr | |
| EnclosedExpr ::= "{" Expr "}" | |
| Expr ::= ExprSingle ("," ExprSingle)* | |
| ExprSingle ::= ForExpr | |
| | LetExpr | |
| | QuantifiedExpr | |
| | IfExpr |
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
| XPath ::= Expr | |
| ParamList ::= Param ("," Param)* | |
| Param ::= "$" EQName TypeDeclaration? | |
| FunctionBody ::= EnclosedExpr | |
| EnclosedExpr ::= "{" Expr "}" | |
| Expr ::= ExprSingle ("," ExprSingle)* | |
| ExprSingle ::= ForExpr | |
| | LetExpr | |
| | QuantifiedExpr | |
| | IfExpr |
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 Convert-ByFilter($values, $predicate) { | |
| return $values | where { & $predicate $_ } | |
| } | |
| Describe "Higher Order Functions" { | |
| $values = @(1, 2, 3, 4) | |
| It "Should filter even" { | |
| $evenPredicate = { param($value) return $value % 2 -eq 0 } | |
| $even = Convert-ByFilter $values $evenPredicate |
- Latest Standard ISO version x86_64 is recommended (http://alpinelinux.org/downloads/)
- Create new VM ("Linux 2.6 / 3.x / 4.x (64-bit)")
- 1 CPU w/ 512BM RAM and 1 GB default (VDI) disk is more than sufficient
- Default networking (NAT)
- Boot and add Alpine ISO as attached virtual install media
- Default root password is blank (though note - ssh PermitRootLogin defaults to disallow blank passwords and: prohibit-password; switch to yes for Host ssh)
- Run setup-alpine
- Defaults are fine, but you do want "sys" disk setup to sda, y to confirm