View keybase.md

Keybase proof

I hereby claim:

  • I am pmbauer on github.
  • I am pmbauer (https://keybase.io/pmbauer) on keybase.
  • I have a public key whose fingerprint is 75B1 C129 A456 7CC7 8B11 2505 85A7 DDD3 3660 317A

To claim this, I am signing this object:

View node_repl.clj
1 2 3 4 5 6 7 8 9 10
(defn define-node-repl-launcher []
(fn [handler]
(fn [fileset]
(defn node-repl []
(require 'cemerick.piggieback 'cljs.repl.node)
((resolve 'cemerick.piggieback/cljs-repl)
:repl-env ((resolve 'cljs.repl.node/repl-env))
:output-dir ".noderepl"
:optimizations :none
:cache-analysis true
View fx-vs-fm.clj
1 2 3 4 5 6 7 8 9 10
;; One example of why one might want to generate platform specific feature macros
 
;; I'm not saying this is a good DSL, just possible with https://github.com/feature-macros/clojurescript/tree/feature-macros/feature-macros-demo
(deftype-unified Foo [bar]
unified/Counted [(count [_] {:cljs (-count bar)
:clj (.count bar)})]
BazProtocol
(fizz [_] :buzz))
 
;; where unified/Counted [...] expands to clojure.lang.Counted/count on :clj and ICounted/-count on :cljs
View build.boot
1 2 3 4 5 6 7 8
(deftask snake []
(letfn [(copy-uri-to-file [uri file]
(with-open [in (clojure.java.io/input-stream uri)
out (clojure.java.io/output-stream file)]
(clojure.java.io/copy in out)))]
(let [snake-mp3 (java.io.File/createTempFile "snake" ".mp3")]
(copy-uri-to-file "http://movie-sounds.org/quotes/toys2/VOlCE-BOX-Theres-a-snake-in-my-boot.mp3" snake-mp3)
(speak :success (.getPath snake-mp3)))))
View gist:a63b5916f0fa96e79282
1 2 3 4 5
I1212 22:03:27.103919 4515 fetcher.cpp:76] Fetching URI 'http://10.88.236.8:9000/proxy'
I1212 22:03:27.104070 4515 fetcher.cpp:126] Downloading 'http://10.88.236.8:9000/proxy' to '/tmp/mesos/slaves/20141212-210553-149706762-5050-2275-S5/frameworks/20141212-210553-149706762-5050-2275-0002/executors/KubeleteExecutorID/runs/f300609d-cb59-4851-a22f-7e57c183590f/proxy'
I1212 22:03:27.389055 4515 fetcher.cpp:76] Fetching URI 'http://10.88.236.8:9000/kubernetes-executor'
I1212 22:03:27.389119 4515 fetcher.cpp:126] Downloading 'http://10.88.236.8:9000/kubernetes-executor' to '/tmp/mesos/slaves/20141212-210553-149706762-5050-2275-S5/frameworks/20141212-210553-149706762-5050-2275-0002/executors/KubeleteExecutorID/runs/f300609d-cb59-4851-a22f-7e57c183590f/kubernetes-executor'
sh: 1: ./kubernetes-executor: Permission denied
View designer.html
1 2 3 4 5 6 7 8 9 10
<link rel="import" href="../code-mirror/code-mirror.html">
 
<polymer-element name="my-element">
 
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
View metrics
1 2 3 4 5 6 7 8 9 10
amd64 Linux 3.2.0-52-generic, 6 cores
Java HotSpot(TM) 64-Bit Server VM 23.21-b01
 
*** Single UseConcMarkSweepGC ***
Runtime arguments: -XX:-UseConcMarkSweepGC
Evaluation count : 300 in 60 samples of 5 calls.
Execution time sample mean : 207.175228 ms
Execution time mean : 207.185921 ms
Execution time sample std-deviation : 1.012513 ms
Execution time std-deviation : 1.022277 ms
View async_thread_ring.clj
1 2 3 4 5 6 7 8 9 10
(require '[clojure.core.async :refer [chan go <! <!! >! >!!]])
 
(defn thread-ring [size n]
{:pre [(> size 1)]}
(let [result (chan 1)
[head :as ring] (vec (repeatedly size #(chan 1)))]
(dotimes [i size]
(let [id (inc i)
in (ring i)
out (ring (mod id size))]
View raw-threadring.clj
1 2 3 4 5 6 7 8 9 10
;; based on my code from test.benchmark
(ns raw-threadring
(:import [java.util.concurrent Exchanger]))
 
 
(def ^Exchanger output-pipe (Exchanger.))
 
(defn relay [state msg]
(if (> msg 0)
(send (:next state) relay (dec msg))
View install_python.sh
1 2 3 4 5 6 7 8 9 10
# wget -O https://gist.github.com/pmbauer/5166100/raw/c72b880ba82dfd598c3cf27a3045833cadec32e2/install_python.sh
# chmod +x install_python.sh
# ./install_python.sh
#!/bin/sh
 
pushd /usr/local/src
 
echo " - Install compilers"
yum -y install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-devel sqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel make
Something went wrong with that request. Please try again.