This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:repl {:plugins [[cider/cider-nrepl "0.10.0"] | |
[lein-cloverage "1.0.2"] | |
[lein-kibit "0.0.8"] | |
[lein-marginalia "0.8.0"] | |
[lein-bikeshed "0.2.0"] | |
[lein-capsule "0.1.1"] | |
[slamhound "1.5.5"] | |
[lein-droid "0.3.5"] | |
[lein-exec "0.3.4"] | |
[jonase/eastwood "0.2.1"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env boot | |
;; -*- mode: Clojure;-*- | |
(set-env! :dependencies '[[seesaw "1.4.5"]]) | |
(use 'seesaw.core) | |
(import '(javafx.scene.web WebView) | |
'(javafx.scene SceneBuilder) | |
'(javafx.scene.layout VBoxBuilder)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `obras`.`datomic_kvs` ( | |
`id` VARCHAR(640) CHARACTER SET 'ascii' COLLATE 'ascii_bin' NOT NULL, | |
`rev` INT, | |
`map` TEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin', | |
`val` LONGBLOB, | |
PRIMARY KEY (`id`)) ENGINE=INNODB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killall ssh-agent gpg-agent | |
unset GPG_AGENT_INFO SSH_AGENT_PID SSH_AUTH_SOCK | |
eval $(gpg-agent --daemon --enable-ssh-support) | |
gpg --batch --decrypt ~/.lein/credentials.clj.gpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use 'clojure.walk) | |
(def ^:dynamic clazz) | |
(defmacro defout [& other] | |
(binding [clazz (first other)] | |
(let [other (mapv macroexpand-all other)] | |
`(~@other)))) | |
(defmacro defin [& other] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use '[clojure.java.io]) | |
(defn walk [dirpath pattern] | |
(doall (filter #(re-matches pattern (.getName %)) | |
(file-seq (file dirpath))))) | |
(->> (walk "src" #".*\.clj") | |
(map #(with-open [rdr (reader (file (.getPath %)))] | |
(count (line-seq rdr)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn bimap [map-atom] | |
(let [inv-atom (atom {})] | |
(add-watch map-atom :bimap | |
(fn [k r old cur] | |
(let [o (set (keys old)) | |
n (set (keys cur))] | |
(doseq [removed (difference o n)] | |
(swap! inv-atom dissoc (old removed))) | |
(doseq [added (difference n o)] | |
(swap! inv-atom assoc (cur added) added))))) |
NewerOlder