Skip to content

Instantly share code, notes, and snippets.

View st's full-sized avatar

Stephane Tavera st

  • Geneva, Switzerland
View GitHub Profile
@st
st / repl.clj
Last active July 15, 2016 09:29
first steps with clojure.spec
user=> (require '[clojure.spec :as s])
nil
user=> (s/def ::big #(< 10 %))
:user/big
user=> (s/valid? ::big 10)
false
user=> (s/valid? ::big 100)
true
user=> (s/def ::big-or-even (s/or ::big even?))
@st
st / es.sh
Last active March 19, 2018 15:30
Elastic useful commands
# Elastic search version
curl 'localhost:9200'
# List all indices
$ curl 'localhost:9200/_cat/indices?v'
# this shows the status
# e.g:
# health status index pri rep docs.count docs.deleted store.size pri.store.size
#  close .kibana
# green open resources-index 3 0 20416 0 7.7mb 7.7mb
@st
st / gist:5c8e1b6f042dd609d0f5a2549c42bdc9
Created February 14, 2017 20:28
URL Electron + Figwheel
https://owensd.io/?p=1156&utm_source=dlvr.it&utm_medium=twitter
On the criteria to be used in decomposing systems into modules – David Parnas
http://sunnyday.mit.edu/16.355/parnas-criteria.html
A Note On Distributed Computing – Jim Waldo, Geoff Wyant, Ann Wollrath, Sam Kendall
http://web.cs.wpi.edu/~cs3013/a11/Papers/Waldo_NoteOnDistributedComputing.pdf
The Next 700 Programming Languages – P. J. Landin
http://thecorememory.com/Next_700.pdf
Can Programming Be Liberated from the von Neumann Style? – John Backus
(ns prisoners.core)
;;
;; Clojure experiment on 100 prisoners problem.
;;
;; See https://en.wikipedia.org/wiki/100_prisoners_problem
;;
(defn best-tries
"Returns the infinite sequence of drawers contents a prisoner will get.