This file contains hidden or 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
#!/bin/bash | |
set -e | |
set -x | |
add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
cat << EOD | debconf-set-selections | |
sun-java5-jdk shared/accepted-sun-dlj-v1-1 select true | |
sun-java5-jre shared/accepted-sun-dlj-v1-1 select true |
This file contains hidden or 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 '[clojure.contrib.shell-out :as shell]) | |
(require '[clojure.contrib.duck-streams :as streams]) | |
(let [eps (shell/sh "gnuplot" "-e" "set term postscript; plot sin(x)/x" :out :bytes)] | |
(with-open [out (streams/writer "example.eps")] | |
(streams/copy eps out))) |
This file contains hidden or 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
; orignal code | |
(def putinme (ref {})) | |
(for [itrId #{"A1HHSCH9YA57GL" "A13706T7S3HLRQ" "A2QNYO5VK24YE4"} ] | |
(dosync ( ref-set putinme ( assoc @putinme itrId {:val 1} ))) | |
) | |
@putinme | |
; for is lazy, body here is never executed; consider doseq |
This file contains hidden or 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 '[clj-serializer.core :as serializer]) | |
(require '[clj-json.core :as m-json]) | |
(require '[org.danlarkin.json :as dl-json]) | |
(require '[clojure.contrib.json.read :as cc-json-read]) | |
(require '[clojure.contrib.json.write :as cc-json-write]) | |
(defn nano-time [] | |
(System/nanoTime)) | |
(defn timed [task] |
This file contains hidden or 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
~/remote/ring(master) $ lein test | |
[null] Exception in thread "main" java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:1) | |
[null] at clojure.lang.Compiler.eval(Compiler.java:4658) | |
[null] at clojure.lang.Compiler.eval(Compiler.java:4633) | |
[null] at clojure.lang.Compiler.eval(Compiler.java:4634) | |
[null] at clojure.core$eval__5236.invoke(core.clj:2017) | |
[null] at clojure.main$eval_opt__7411.invoke(main.clj:227) | |
[null] at clojure.main$initialize__7418.invoke(main.clj:246) | |
[null] at clojure.main$null_opt__7446.invoke(main.clj:271) | |
[null] at clojure.main$main__7466.doInvoke(main.clj:346) |
This file contains hidden or 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
~/remote/leiningen(master) $ git show-ref HEAD | |
94c675afe6767aa142bfc882298f0f828e476e24 refs/remotes/origin/HEAD | |
~/remote/leiningen(master) $ git diff | |
diff --git a/bin/lein b/bin/lein | |
index 9b587b6..25cfe49 100755 | |
--- a/bin/lein | |
+++ b/bin/lein | |
@@ -80,5 +80,5 @@ elif [ "$1" = "self-install" ]; then | |
exec wget -O "$LEIN_JAR" "$LEIN_URL" |
This file contains hidden or 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
;; possible functional interface | |
(defn with-sessions [handler session-store-impl & [opts]] ...) | |
(defn session [req] ...) | |
(defn flash [req] ...) | |
(defn session-assoc [resp key val] ...) | |
(defn session-dissoc [resp key] ...) | |
(defn session-set [resp session] ...) | |
(defn session-drop [resp] ...) | |
(defn flash-assoc [resp key val] ...) |
This file contains hidden or 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
~/remote/leiningen(master) $ git show-ref HEAD | |
b6a807bd3350138cfe88821207071378dcba9fdb refs/remotes/origin/HEAD | |
~/remote/leiningen(master) $ lein deps | |
[INFO] snapshot leiningen:lein-swank:1.0.0-SNAPSHOT: checking for updates from central | |
[INFO] snapshot leiningen:lein-swank:1.0.0-SNAPSHOT: checking for updates from clojure-snapshots | |
[INFO] snapshot leiningen:lein-swank:1.0.0-SNAPSHOT: checking for updates from clojars | |
[INFO] snapshot leiningen:leiningen:1.0.0-SNAPSHOT: checking for updates from clojure-snapshots | |
[INFO] snapshot leiningen:leiningen:1.0.0-SNAPSHOT: checking for updates from clojars | |
[INFO] snapshot leiningen:leiningen:1.0.0-SNAPSHOT: checking for updates from central |
This file contains hidden or 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
(defproject foo "0.0.1" | |
:repositories [["clojure-releases" "http://build.clojure.org/releases"]] | |
:dependencies [[org.clojure/clojure "1.1.0"] | |
[org.clojure/clojure-contrib "1.1.0"]]) |
This file contains hidden or 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
~/remote/ring(clojure-test) $ lein test | |
[null] Exception in thread "main" java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:1) | |
[null] at clojure.lang.Compiler.eval(Compiler.java:4658) | |
[null] at clojure.lang.Compiler.eval(Compiler.java:4633) | |
[null] at clojure.core$eval__5236.invoke(core.clj:2017) | |
[null] at clojure.main$eval_opt__7411.invoke(main.clj:227) | |
[null] at clojure.main$initialize__7418.invoke(main.clj:246) | |
[null] at clojure.main$null_opt__7446.invoke(main.clj:271) | |
[null] at clojure.main$main__7466.doInvoke(main.clj:346) | |
[null] at clojure.lang.RestFn.invoke(RestFn.java:426) |