Skip to content

Instantly share code, notes, and snippets.

View thearthur's full-sized avatar

Arthur Ulfeldt thearthur

  • Santa Cruz, CA, USA, Earth
View GitHub Profile

badness:

starting metabase is slower than it has any good reason to be.

goodness:

Speed up access to liquibase changelog

stuff we know:

possbile solutions

Don’t have this problem

Stop having this problem by just maintaining one file

  • This is the most basic solution.
@thearthur
thearthur / bankocr.clj
Created August 29, 2012 04:14
clojure Dojo team 3
(ns bankocr.core)
(def parse {\space :., \_ :_, \| :|})
(defn parse-input [input] (map parse input ))
(def digits { [[:. :_ :.]
[:| :. :|]
[:| :_ :|]] 0
[[:. :. :.]
@thearthur
thearthur / gist:2919433
Created June 12, 2012 19:01
pallet-hadoop error
java.util.concurrent.ExecutionException: clojure.contrib.condition.Condition: Error executing script :
:cmd su -s /bin/bash hadoop -c " export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java))); echo N | /usr/local/hadoop-0.20.2/bin/hadoop namenode -format "
echo "Start Hadoop Name Node..."
{ su -s /bin/bash hadoop -c " export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java))); if ! jps | grep -i namenode; then /usr/local/hadoop-0.20.2/bin/hadoop-daemon.sh start namenode;fi "; } || { echo "Start Hadoop Name Node" failed; exit 1; } >&2
echo "...done"
echo "hadoop dfsadmin -safemode wait..."
{ su -s /bin/bash hadoop -c " export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list java))); /usr/local/hadoop-0.20.2/bin/hadoop dfsadmin -safemode wait "; } || { echo "hadoop dfsadmin -safemode wait" failed; exit 1; } >&2
echo "...done"
echo "hadoop fs -mkdir /tmp/node-name/data..."
{ su -s /bin/bash hadoop -c " export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list
;;; See the inspirational SO question: http://stackoverflow.com/questions/3346382
(require 'clojure.contrib.trace)
(defn trace-ns
"Replaces each function from the given namespace with a version wrapped
in a tracing call. Can be undone with untrace-ns. ns should be a namespace
object or a symbol."
[ns]
(doseq [s (keys (ns-interns ns))