A cheatsheet inspired by the book "Clojure for the Brave and True".
- C = Control Key
- M = Meta Key (Alt on PCs, Option on Macs)
Examples:
Clojure development environment in Microsoft VScode.
Ubuntu
# Export a sensitive environment variable, hiding it from command history and the terminal. | |
read -rs my_var ; export my_var | |
# Don't forget to unset it later, when done | |
unset my_var |
Official site: https://www.clojure.org/index
Install Clojure dependencies. (Ubuntu)
sudo apt install openjdk-11-jdk rlwrap
java -version
Clojure CLI tools (with deps.edn) allow for a built in way to create projects.
Official CLI/deps guide: https://clojure.org/guides/deps_and_cli
Pre-reqs: Clojure and dependencies installed.
Install a project creation Tool.
Leiningen is another method for managing Clojure projects. It is similar to pipenv in the Python world, in that it manages project space and dependent packages.
Offical Site: https://leiningen.org/
Lein can be extended via plugins.
Some useful plugins are:
.PHONY: build test deploy | |
##-- Environment Variables --# | |
# Image and container registry | |
IMAGE_NAME := my-image-name | |
IMAGE_PATH := mygroup/myproject | |
REGISTRY := registry-url:port | |
IMAGE := $(REGISTRY)/$(IMAGE_PATH)/$(IMAGE_NAME) |