Skip to content

Instantly share code, notes, and snippets.

View wdhowe's full-sized avatar

Bill Howe wdhowe

View GitHub Profile
@wdhowe
wdhowe / emacs-cheatsheet.md
Last active June 15, 2023 06:49
Emacs Cheatsheet

Emacs Cheatsheet

A cheatsheet inspired by the book "Clojure for the Brave and True".

Shortcut Keys Used

  • C = Control Key
  • M = Meta Key (Alt on PCs, Option on Macs)

Examples:

Clojure Development with VScode

Clojure development environment in Microsoft VScode.

Software Install

  • Install Microsoft Visual Studio Code via download or your package manager.

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
@wdhowe
wdhowe / clojure-install.md
Last active February 3, 2024 21:19
Install the Clojure Programming Language

Install Clojure

Official site: https://www.clojure.org/index

  • Install Clojure dependencies. (Ubuntu)

    sudo apt install openjdk-11-jdk rlwrap
    java -version
@wdhowe
wdhowe / clojure-repl-help.md
Last active November 28, 2020 18:03
Clojure commands for getting help, docs and more while in the REPL

Clojure REPL Help

Commands that can be entered in the REPL for finding help, documentation, and more.

Load clojure REPL helper functions

(require '[clojure.repl :refer :all])
@wdhowe
wdhowe / clojure-tools-deps-projects.md
Last active February 3, 2024 21:14
Creating Clojure projects with deps.edn
@wdhowe
wdhowe / clojure-lein-projects.md
Last active February 3, 2024 21:11
Creating Clojure projects with Leiningen

Leiningen Projects

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/

Install Leiningen

  • Download the installer
@wdhowe
wdhowe / clojure-lein-plugins.md
Last active February 3, 2024 21:09
Installing plugins for Clojure's Leiningen

Leiningen Plugins

Lein can be extended via plugins.

Some useful plugins are:

  • lein-ancient -> Check your project for outdated dependencies and plugins, as well as upgrade them if desired.
  • lein-exec -> Allows single clojure files to be executed and their requirements resolved.
  • lein-localrepo -> Work with local Maven repository.
  • lein-pprint -> Pretty-print a representation of the project map.
@wdhowe
wdhowe / docker-commands.md
Created November 28, 2020 19:36
Docker commands to build, push, and run containers.

Docker Image Running/Building Examples

The docker images can all be run/built similar to the following.

Variables

Setup the variables per image.

GitHub Example

@wdhowe
wdhowe / Makefile
Last active April 11, 2021 22:10
An example Makefile for Docker and Leiningen.
.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)