Skip to content

Instantly share code, notes, and snippets.

(defn- reverse-index
[keyfn valfn coll]
(->> (group-by keyfn coll)
(reduce-kv #(assoc %1 %2 (set (map valfn %3))) {})))
(comment
(def data
[{:path "foo/bar" :id "1234567"}
{:path "baz/baf" :id "1234567"}
(deftask evaluate
"Evaluate expressions."
[e expression EXPR [edn] "The vector of expressions to evaluate."]
(with-pre-wrap fileset
(prn (mapv eval expression))
fileset))
(defmethod do! :reset-class
[elem key val]
(aset elem "className" val))
(comment
(div :id "thing"
:do-reset-class (cell= (str "thing-number-" (inc thing-count))))
@micha
micha / hist.clj
Last active August 29, 2015 14:13
(def p (pod/make-pod (get-env)))
(pod/with-eval-in p
(create-ns 'pod)
(dosync (alter @#'clojure.core/*loaded-libs* conj 'pod))
(alter-var-root #'*ns* (constantly (the-ns 'pod)))
(clojure.core/binding [clojure.core/*ns* clojure.core/*ns*]
(clojure.core/refer-clojure)))
(pod/with-eval-in p
set backup
set backupdir=~/.vim-tmp
set directory=~/.vim-tmp
set swapfile
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>boot</groupId>
<artifactId>base</artifactId>
<packaging>jar</packaging>
<version>__VERSION__</version>
<name>base</name>
<url>https://github.com/boot-clj/boot</url>
<description>Boot Java application loader and class.</description>
goog.provide('cljsjs.jquery');
eval("/*! jQuery v1.8.2 jquery.com | jquery.org/license */ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e=\"data-\"+c.replace(I,\"-$1\").toLowerCase();d=a.getAttribute(e);if(typeof d==\"string\"){try{d=d===\"true\"?!0:d===\"false\"?!1:d===\"null\"?null:+d+\"\"===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b===\"data\"&&p.isEmptyObject(a[b]))continue;if(b!==\"toJSON\")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b==\"string\"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))retu
(defn externs
"Middleware to add externs files (i.e. files with the .ext.js extension) and
Google Closure libs (i.e. files with the .lib.js extension) from the fileset
to the CLJS compiler options."
[{:keys [tmp-src tmp-out main files opts] :as ctx}]
(let [ext-paths (map core/tmppath (:exts files))
lib-ins (map core/tmpfile (:libs files))
renamelib #(.replaceAll % "\\.lib\\.js$" ".js")
merge-cfg (partial merge-with (comp vec distinct into))
lib-paths (->> (map (comp renamelib core/tmppath) (:libs files))
#!/usr/bin/env bash
if [ -f .boot-jvm-options ]; then
OPTS=`cat .boot-jvm-options`
fi
BOOT_JVM_OPTIONS="$OPTS" boot "$@"
(ns fx.patch-clojure)
(in-ns 'clojure.core)
(def ^:dynamic *target-platform* :clj)
(defmacro ns+ [& clauses]
(let [require-ops #{:refer-clojure :require :use :import :load :gen-class
:require-macros :use-macros}
ok? #(cond