apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
| (def ^:dynamic *indent* 0) | |
| (alter-var-root | |
| #'clojure.core/load | |
| (fn [orig] | |
| (fn [& paths] | |
| (let [t (System/nanoTime) | |
| r (binding [*indent* (inc *indent*)] | |
| (apply orig paths))] | |
| (binding [*out* *err*] | |
| (println (apply str (repeat *indent* " ")) (/ (- (System/nanoTime) t) 1000000.0) paths) |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
| #!/bin/sh | |
| # deploy.sh | |
| N="`readlink \"$1\"`" | |
| mv -T "$1.stage" "$1" | |
| ln -s "$N" "$1.stage" | |
| rm -rf "$N" | |
| cp -aH "$1" "$N" |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' 'http://10.140.10.40'; | |
| # |