From Docker in Practice, by IAan Miell, Aidan Hobson Sayers
docker ps -q | xargs docker inspect --format='{{.NetworkSettings.IPAddress}}' | xargs -l1 ping -c1
function basher() {
== Compilation error on file lib/common_macros.ex == | |
** (SyntaxError) lib/common_macros.ex:3: syntax error before: '>' | |
(elixir) lib/kernel/parallel_compiler.ex:95: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8 | |
** (exit) shutdown: 1 | |
(elixir) lib/kernel/parallel_compiler.ex:199: Kernel.ParallelCompiler.handle_failure/5 | |
(elixir) lib/kernel/parallel_compiler.ex:182: Kernel.ParallelCompiler.wait_for_messages/8 | |
(elixir) lib/kernel/parallel_compiler.ex:55: Kernel.ParallelCompiler.spawn_compilers/3 | |
(iex) lib/iex/helpers.ex:94: IEx.Helpers.c/2 |
;;=> (var 0) | |
;;Traceback (most recent call last): | |
;; File "<input>", line 1, in <module> | |
;; File "<input>", line 4, in __init__ | |
;;TypeError: object.__init__() takes no parameters | |
(defclass var [PSet] | |
[] | |
(defn --init-- [self c] | |
(.--init-- (super) self [c])) |
(import [user-mu [*]]) | |
(require user-mu) | |
;; Mostly translated from Scheme examples in "The Reasoned Schemer," | |
;; by Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov. | |
(defn caro [p a] | |
(fresh [d] | |
(== (cons a d) p))) |
;; In script/figwheel.clj | |
;; Can be run from project root: | |
;; $ rlwrap lein run -m clojure.main script/figwheel.clj | |
;; | |
;; Or, from a CLJS file buffer: | |
;; M-x cider-jack-in | |
;; then eval these forms: | |
;; M-x cider-eval-buffer | |
(require | |
'[figwheel-sidecar.repl :as r] |
defmodule Demo.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :demo, | |
version: "0.0.1", | |
elixir: "~> 1.3", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: [:phoenix, :gettext] ++ Mix.compilers, | |
build_embedded: Mix.env == :prod, |
module Six where | |
data TisAnInteger = | |
TisAn Integer | |
instance Eq TisAnInteger where | |
(==) (TisAn x) (TisAn x') = | |
x == x' | |
data TwoIntegers = |
docker ps -q | xargs docker inspect --format='{{.NetworkSettings.IPAddress}}' | xargs -l1 ping -c1
function basher() {
public class Presence { | |
func adder(a: Int, b: Int) -> Int { | |
return a + b | |
} | |
func anotherAdder(addy: (Int, Int) -> Int = adder) -> Int { | |
return addy(4, 5) + 6 | |
} | |
} |
(require 'package) | |
(setq package-archives | |
'(("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/") | |
("melpa-stable" . "http://stable.melpa.org/packages/") | |
("gnu" . "http://elpa.gnu.org/packages/") | |
)) | |
;; ("org" . "http://orgmode.org/elpa/") | |
(setq package-pinned-packages |
(set-env! | |
:source-paths #{"src"} | |
:dependencies '[]) | |
(require '[boot.core :as c] | |
'[clojure.java.io :as io]) | |
(deftask my-count |