Skip to content

Instantly share code, notes, and snippets.

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=f12392e345a5ba9eddc995a09066eb15a4c4a36a07917d5eb6bb9c98aa3c3691&shmsize=0&target=&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
(defun motion-wrapper (motion)
(progn
;; Attempt a motion command, allowing it to end up inside of an overlay.
(condition-case nil
(funcall motion)
;; If it fails, remove the overlay at point if any
(error (progn
(message "error happened!")
(function-to-remove-overlay))))
(let ((overlay (function-to-get-overlay-at-point)))
SF:
Kim Stanley Robinson - short stories
Ursula K Le Guin - The Eye of the Heron
Philip K Dick - The Exegesis of Philip K Dick (you probably don't want this)
Philip K Dick - The Divine Invasion
Iain M Banks - Matter
Iain Banks - The Wasp Factory
David Mitchell - Cloud Atlas (tom hanks)
T.H. White - The Once and Future King (made me cry on an airplane)
Walter M Miller Jr. - A Canticle for Leibowitz (excellent)

Keybase proof

I hereby claim:

  • I am johnbcoughlin on github.
  • I am misterinteger (https://keybase.io/misterinteger) on keybase.
  • I have a public key whose fingerprint is 2EFE ECDA E4B4 91D5 2342 3BF0 4548 ECAA C6F6 C2BC

To claim this, I am signing this object:

#!/bin/sh
cabal configure -p --ghc-options="-prof" --enable-tests --enable-library-profiling
cabal build tests
dist/build/tests/tests +RTS -p -hc
cat tests.prof

Demonstration of Inverse Transform Sampling.

Relies on a numerical approximation to the probit function found here. Values are sampled uniformly from the interval [0, 1] and mapped through the probit function. If X is a random variable in Uniform(0, 1), then Y=probit(X) is a normally distributed random variable.