Support sandboxes for Elixir, Haskell, Clojure

The dream is to create an offline version of something like repl.it.
This commit is contained in:
William Carroll 2019-05-13 16:37:47 +01:00
parent 011d302b9e
commit 5cb0aebbd3
2 changed files with 8 additions and 11 deletions

View file

@ -88,7 +88,10 @@ alias tism="MIX_ENV=test iex -S mix"
alias mdg="mix deps.get" alias mdg="mix deps.get"
alias mdu="mix deps.update" alias mdu="mix deps.update"
alias mdup="mix docker.up" alias mdup="mix docker.up"
alias sandbox_ex='dkish elixir iex' # depends on the docker aliases alias repl_ex='dkish elixir iex' # depends on the docker aliases
# Clojure
alias repl_clj='dkish clojure lein repl'
# GPG # GPG
alias gpged='gpg --edit-key wpcarro@gmail.com' alias gpged='gpg --edit-key wpcarro@gmail.com'
@ -135,7 +138,7 @@ alias se="stack exec --"
alias sc="stack clean" alias sc="stack clean"
# alias st="stack test" # blocks suckless-terminal # alias st="stack test" # blocks suckless-terminal
alias haddocks='open "$(stack path --local-doc-root)/index.html"' alias haddocks='open "$(stack path --local-doc-root)/index.html"'
alias sandbox_hk='dkish haskell ghci' alias repl_hk='dkish haskell ghci'
# Kubernetes # Kubernetes
alias kc="kubectl" alias kc="kubectl"

View file

@ -104,15 +104,9 @@ dkcsh() {
} }
dkish() { dkish() {
# Runs a Docker container with `/usr/bin/env bash`. # Runs a Docker container interactively
# `dkish` stands for DocKer Image SHell. # Usage: dkrit <container_name> <command> [...args]
# Note: This defers from `dksh`, which accepts a container instead of an docker run -it $@
# image.
# Usage: dkrit <container_name> [command]
image=$1
cmd=${2-/bin/bash}
docker run -it "$image" "$cmd"
} }
# Emacs # Emacs