Skip to content

Instantly share code, notes, and snippets.

(defn checkout-deps-paths [project]
(apply concat (for [dep (.listFiles (file (:root project) "checkouts"))
;; Note that this resets the leiningen.core/project var!
:let [proj (read-dependency-project dep)]
:when proj]
(for [d (:checkout-deps-shares project [:source-path :compile-path :resources-path])]
(ensure-absolute (d proj) dep))))))
:checkout-deps-shares [:source-path :resources-path :test-path
@paraseba
paraseba / gist:1167254
Created August 24, 2011 03:40
Jorge Luis Borges on novice writers (or programmers?)
Look, I mean to say this: When I began writing, I thought that
everything should be defined by the writer. For example, to say
“the moon” was strictly forbidden; that one had to find an
adjective, an epithet for the moon. (Of course, I'm simplifying
things. I know it because many times I have written “la luna,”
but this is a kind of symbol of what I was doing.) Well, I
thought everything had to be defined and that no common turns
of phrase should be used. I would never have said, “So-and-so
came in and sat down,” because that was far too simple and far
too easy. I thought I had to find out some fancy way of saying
(def file-path "words.txt")
@paraseba
paraseba / gist:1328334
Created October 31, 2011 18:21
Setup your environment for the Clojure hands-on training

##Install Java

Install any version of Java JDK >= 1.5 You can download Java using your system's package manager or going to http://www.oracle.com/technetwork/java/javase/downloads/index.html

##Install Leiningen

Leiningen will help us automating some common tasks like installing dependencies and running the REPL. The installation procedure changes if you are in a Unix like system or in Windows. If you have any problems, there is more information in Leiningen's page: https://github.com/technomancy/leiningen

; Currencies know how to create Money
(defprotocol Currency
(make-money [this amount]))
; Money knows the details about how to print itself, round, etc.
; We want to be able to pass Moneys around, and after the fact, be able to
; print them, round them, etc.
(defprotocol Money
(str$ [this])
(round$ [this]))
(defn f1 [n]
(lazy-seq
(cons n (f1 (inc n)))))
(nth (f1 0) 5000)
;; => 5000
(defn f2 [n]
(lazy-seq
(cons n (map identity (f2 (inc n))))))

Keybase proof

I hereby claim:

  • I am paraseba on github.
  • I am paraseba (https://keybase.io/paraseba) on keybase.
  • I have a public key whose fingerprint is 9D6D 0755 86C2 1B61 42D1 7883 8124 48E5 924F EEA5

To claim this, I am signing this object:

<html>
<body><p>hello world</p></body></html>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512,SHA1
I am transitioning GPG keys from an old 1024 and 2048-bit key to a new
4096-bit RSA key.
This transition document is signed with the 3 keys to validate the
transition.
The old keys, which I am transitional away from, is:

Keybase proof

I hereby claim:

  • I am paraseba on github.
  • I am paraseba (https://keybase.io/paraseba) on keybase.
  • I have a public key whose fingerprint is F634 BC3E 4DF3 CBF1 35F7 0158 9067 9A7E 1C48 CC35

To claim this, I am signing this object: