Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
package sun.net.www.protocol.s3; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.net.URLStreamHandler; | |
import org.jets3t.service.ServiceException; | |
import org.jets3t.service.impl.rest.httpclient.RestS3Service; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
;; Datomic example code | |
(use '[datomic.api :only (db q) :as d]) | |
;; ?answer binds a scalar | |
(q '[:find ?answer :in ?answer] | |
42) | |
;; of course you can bind more than one of anything | |
(q '[:find ?last ?first :in ?last ?first] | |
"Doe" "John") |
#!/bin/sh | |
echo "assumes java 7 is instlaled openjdk versio" | |
#pre dependencies | |
sudo apt-get install git-core pkg-config libtool automake make g++ connect-proxy unzip python | |
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 | |
#install zeromq | |
git clone git clone git://github.com/zeromq/libzmq.git |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
(def c (chan)) | |
(defn drain [c] | |
(go | |
(loop [col []] | |
(if-let [v (<! c)] | |
(recur (conj col v)) | |
col)))) |
(ns ring.adapter.webbit | |
(:require [clojure.string :as s] | |
[clojure.java.io :as io]) | |
(:import [org.webbitserver WebServer WebServers HttpHandler] | |
[java.io File InputStream])) | |
(defn- transform-headers [headers] | |
(apply hash-map (mapcat (fn [e] [(s/lower-case (.getKey e)) | |
(.getValue e)]) headers))) |
Find it here: https://github.com/bitemyapp/learnhaskell