Skip to content

Instantly share code, notes, and snippets.

View edap's full-sized avatar

Davide Prati edap

View GitHub Profile
(defn da-example-apply-recursively
[]
(let [hex (mg/apply-recursively (mg/reflect :e) 5 [1] 1)
seed (a/aabb [0 0 0] 0.95)
tree (mg/skew
:n
:e
:offset 0.3
:out [hex])
]

install this: https://github.com/parkr/ruby-build-github

And then install the ruby version 2.1.7 rbenv install 2.1.7-github

go in the folder of your website. Run:

rbenv local 2.1.7-github

This will set the ruby version of your project to 2.1.7.

func isImage(filename string) bool {
is_img, _ := regexp.MatchString("(?i)\\.(png|jpg|jpeg|gif)$", filename)
return is_img
}
def qsort(l)
return l if l.length <= 1
pivot = l.sample
lft, rgt = l.partition {|e| e < pivot}
qsort(lft).concat(qsort(rgt))
end