- 3 whole star anise
- 15 whole cardamon pods
- 2 tblsp ground cinnamon (or ~0.75 stick)
- 1.5 tblsp ground cloves
- 0.5 tsp ground coriander
- 0.75 tsp ground ginger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftype Foo [x y] | |
clojure.lang.IFn | |
(invoke [_ a] (case a 0 x, 1 y)) | |
(invoke [_ a nf] (case a 0 x, 1 y nf))) | |
(def f (Foo. 23 42)) | |
(f 0) ; => 23 | |
(f 2 -1) ; => -1 | |
(apply f [0]) ; AbstractMethodError clojure.core/apply (core.clj:624) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pointatdemo | |
(:require | |
[thi.ng.geom.core :as g] | |
[thi.ng.geom.tetrahedron :as t] | |
[thi.ng.geom.meshio :as mio] | |
[clojure.java.io :as io])) | |
(defn point-at | |
"Takes an entity implementing PTransform, a reference point and two | |
direction vectors. Transforms the entity in such a way that the 1st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-nginx-for-ubuntu-12-04 | |
sudo openssl genrsa -des3 -out new.key 1024 | |
sudo openssl req -new -key new.key -out new.csr | |
sudo cp new.key new.key.orig | |
sudo openssl rsa -in new.key.orig -out new.key | |
sudo openssl x509 -req -days 1095 -in new.csr -signkey new.key -out new.crt | |
sudo service nginx restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -strip -interlace Plane -sampling-factor 4:2:0 -define jpeg:dct-method=float -quality 90% src.jpg dest.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns coloredmesh | |
(:require | |
[thi.ng.geom.core :as g] | |
[thi.ng.geom.core.vector :as v] | |
[thi.ng.geom.core.matrix :as mat :refer [M44]] | |
[thi.ng.geom.aabb :as a] | |
[thi.ng.geom.core.utils :as gu] | |
[thi.ng.geom.webgl.core :as gl] | |
[thi.ng.geom.webgl.arrays :as arrays] | |
[thi.ng.geom.webgl.animator :as anim] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; CLJS 0.0-3196 | |
(reduce conj [] (eduction (filter identity) [1 2 3 4])) | |
;; [1 2 3 4] | |
(defrecord Foo [state]) | |
(defn add-foo [foo x] (Foo. (conj (:state foo) x))) | |
(reduce add-foo (Foo. []) (sequence (filter identity) [1 2 3 4])) | |
;; => #cljs.user.Foo{:state [1 2 3 4]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes. | |
It's an ever-growing list. | |
------------------------------ | |
Relevant links: | |
http://en.wikipedia.org/wiki/Types_of_mesh | |
http://en.wikipedia.org/wiki/Tetrahedron | |
http://en.wikipedia.org/wiki/Simplicial_complex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require | |
'[thi.ng.geom.core :as g] | |
'[thi.ng.geom.core.vector :as v :refer [vec2 vec3]] | |
'[thi.ng.geom.core.matrix :refer [M44]] | |
'[thi.ng.geom.core.utils :as gu] | |
'[thi.ng.geom.aabb :as a] | |
'[thi.ng.geom.plane :as pl] | |
'[thi.ng.geom.quad :as q] | |
'[thi.ng.geom.webgl.core :as gl] | |
'[thi.ng.geom.webgl.buffers :as buf] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[thi.ng.strf.core :as strf]) | |
(require '[clojure.string :as str]) | |
(defn parse-accept-header | |
[accept] | |
(->> accept | |
(re-seq #"((([\w\*\-]+/[\w\*\-\+]+,?)+)(;q=(\d+\.\d+))?)") | |
(mapcat | |
(fn [[_ _ a _ _ q]] | |
(let [q (if q (strf/parse-float q 0) 1)] |
OlderNewer