Skip to content

Instantly share code, notes, and snippets.

(require '[boot.core :as core]
'[boot.file :as file]
'[clojure.java.io :as io])
(let [tmpd (core/mktgtdir!)
srcs (->> (core/src-files+) (core/by-ext [".scss" ".sass"]))]
;; make hardlinks for all the scss and sass files into the tempdir
(doseq [in srcs]
(let [rel-path (core/relative-path in)
(deftask development
"Build {{raw-name}} for development."
[& {:keys [port]}]
(comp (watch)
(hoplon {:pretty-print true :prerender false})
(dev-server :port (or port 8080))))
(ns boot-cljsjs
(:require
[clojure.java.io :as io]
[boot.core :as core]
[boot.util :as util]
[boot.task.built-in :as task]))
(defn path-seq
[path]
(->> path
FROM ubuntu:12.04
RUN apt-get update && apt-get install -y -f --no-install-recommends openjdk-7-jdk wget
RUN update-alternatives --config java
RUN wget -O /usr/bin/boot \
https://github.com/tailrecursion/boot/releases/download/v2-r1/boot.sh \
&& chmod +x /usr/bin/boot
ENV BOOT_LOCAL_REPO /m2
(page "index.html"
(:require
[tailrecursion.hoplon.reload :refer [reload-all]]))
(reload-all 1000)
(defn clamp [lower x upper]
(max lower (min x upper)))
;; this cell contains some info, but we want to make sure
@micha
micha / init
Created December 14, 2014 17:48
# vim: ft=sh
DIR=$(dirname $BASH_SOURCE)
for i in $DIR/*.sh; do
. "$i"
done
@micha
micha / .vimrc
Created December 15, 2014 18:58
set backup
set backupdir=~/.vim-tmp
set directory=~/.vim-tmp
set swapfile
(page "index.html")
(defc people
[{:first "micha"
:last "niskin"}
{:first "sergey"
:last "raichman"}])
(def indexed
(partial map-indexed list))
(require '[boot.pod :as pod]
'[clojure.java.io :as io])
(import java.net.URL)
(System/setProperty
"java.class.path"
(->> (pod/get-classpath)
(map #(.getPath (URL. %)))
(filter #(.isDirectory (io/file %)))
(interpose (System/getProperty "path.separator"))
(apply str)))
(ns boot.repl-client
(:require
[reply.main :as reply]))
(def default-opts {:color true :history-file ".nrepl-history"})
(defn client [opts]
(let [p (or (:port opts) (try (slurp ".nrepl-port") (catch Throwable _)))
h (or (:host opts) "127.0.0.1")]
(assert (and h p) "host and/or port not specified for REPL client")