Skip to content

Instantly share code, notes, and snippets.

View jeffcai's full-sized avatar

Jianfeng Cai jeffcai

View GitHub Profile
## macos setup
- homebrew
- alfred
- chrome
- clipboard manager: flycut
- window manager: spectacle
- idea
- liteide
- vscode
@jeffcai
jeffcai / gist:9a021fcb0d0bdaff6e696c2b8ca94cea
Created February 20, 2017 14:32
resolution for the issue below when running vagrant up
exception ...
```
vagrant up
dyld: Library not loaded: /vagrant-substrate/staging/embedded/lib/libssl.1.0.0.dylib
Referenced from: /opt/vagrant/embedded/bin/openssl
Reason: image not found
./../lib/init-ssl-ca: line 32: 20343 Abort trap: 6 openssl genrsa -out "$OUTDIR/ca-key.pem" 2048
failed generating SSL CA artifacts
```
Remove all images/containers then:
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls |awk '{print $2}')
rm -rf ~/Library/Containers/com.docker.docker/Data/*
@jeffcai
jeffcai / uncheck dojo CheckBox widget
Created March 8, 2013 05:28
uncheck dojo CheckBox widget
dojo.query("[name='_name']").forEach(function(node, index, arr) {
var widget = dijit.getEnclosingWidget(node);
widget.attr('checked', false);
});
@jeffcai
jeffcai / clojure-match.clj
Created September 4, 2012 17:09 — forked from ckirkendall/clojure-match.clj
Language Compare F#, Ocaml, Scala, Clojure, Ruby and Haskell - Simple AST example
(use '[clojure.core.match :only [match]])
(defn evaluate [env [sym x y]]
(match [sym]
['Number] x
['Add] (+ (evaluate env x) (evaluate env y))
['Multiply] (* (evaluate env x) (evaluate env y))
['Variable] (env x)))
(def environment {"a" 3, "b" 4, "c" 5})