Stuart talking about them as part of the Day of Datomic videos:
https://youtu.be/ZP-E2IgqKfA?t=2412
Simple data structure for anomalies.
Stuart talking about them as part of the Day of Datomic videos:
https://youtu.be/ZP-E2IgqKfA?t=2412
Simple data structure for anomalies.
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T [email protected] | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
#!/usr/bin/env lumo | |
(ns spacedl.spacedl | |
(:require [cljs.nodejs :as node] | |
[clojure.pprint :refer [pprint]] | |
[clojure.string :as string :refer [join split starts-with?]] | |
[cljs.core :refer [*command-line-args*]])) | |
(node/enable-util-print!) | |
(.on js/process "uncaughtException" #(js/console.error %)) |
; it's a bit cumbersome to set up and there's the unfortunate need to ignore the tag | |
; in the individual methods, but this allows you to leave the interpretation of open | |
; variants, well, *open* for extension by multimethod. | |
; dispatch off the first argument, which will be the tag | |
(defmethod command-multi (fn [tag & data] tag)) | |
; the first argument to the *method* is still the tag | |
(defmulti command-multi :print [_ val] (println val)) | |
(defmulti command-multi :read [_ fname] (slurp fname)) |
... | |
# Fake a fuse install | |
RUN apt-get install libfuse2 | |
RUN cd /tmp ; apt-get download fuse | |
RUN cd /tmp ; dpkg-deb -x fuse_* . | |
RUN cd /tmp ; dpkg-deb -e fuse_* | |
RUN cd /tmp ; rm fuse_*.deb | |
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst | |
RUN cd /tmp ; dpkg-deb -b . /fuse.deb |
This is a handy bit of code I've written more than once. I thought I'd throw it in here so I can refer back to it later. Basically, it lets you read a config file to produce a Clojure map. The config files themselves can contain one or more forms, each of which can be either a map or a list. Maps are simply merged. Lists correspond to invocations of extension points, which in turn produces a map, which is merged along with everything else.
Consider the following files:
names.edn
;;; cljdoc.el --- eldoc mode for clojure | |
;; Copyright (C) 2011 tomykaira | |
;; Version 0.1.0 | |
;; Keywords: eldoc clojure | |
;; Author: tomykaira <[email protected]> | |
;; URL: https://gist.github.com/1386472 | |
;; This file is not part of GNU Emacs. |
;; | |
;; 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. |