View README.md
class FirstPublisher
  include Wisper::Publisher
  include Wisper::Bubble

  def call
    broadcast(:it_happened)
  end
end
View 00-INTRO.md

I wanted a function to convert given keys in a vector and maps from true/false to "yes"/"no".

[{ :is_it true } { :is_it false }] ;; => [{ :is_it "Yes" } { :is_it "No" }]

Note I use boolean? which was added to Clojure 1.9, it can be replaced with (instance? Boolean bool) in 1.8.

View 00-examples.clj
(t/ann stringy [t/Str -> t/Str]))
(defn stringy [a] (str a))
(stringy 1) ;; => runtime type error
(defn stringy [a] (symbol a)) ;; => compile time error
(t/ann person '{:name t/Str})
(def person { :name 1 }) ;; error
View 00-ideavimrc
set surround
set hlsearch
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
set relativenumber
set number
View convert.clj
;; converts boolean (true/false) to text (yes/no)
(defn- boolean-to-text [bool]
{:pre [(boolean? bool)] }
(if (true? bool) "Yes" "No"))
;; returns true if coll contains given value
(defn- seq-contains? [coll target] (some #(= target %) coll))
;; converts key values from true/false to yes/no in map
(defn- coerce-boolean-values-for-map [bool-keys record]
View example.clj
(def fundings (sql/select-external-fundings sql/db { :year 2017 })) ;; raw data: ({...} {...})
(def sum-keys [:industry_collaborative :research_charity]) ;; keys we want to sum
(def sum-fundings map #(select-keys % sum-keys) fundings)) ;; collection with only keys we want to sum
;; => ({:industry_collaborative 1M :research_charity 2M}
;; {:industry_collaborative 1M :research_charity 1M}
;; {:industry_collaborative 10M :research_charity 1M})
(def start-map (reduce #(assoc %1 %2 0) {} sum-keys)) ;; map with keys all with values of 0
View jxmls.clj
:dependencies [[org.clojure/clojure "1.8.0"]
[org.jxls/jxls "2.4.2"]
[org.jxls/jxls-poi "1.0.13" :exclusions [org.jxls/jxls]]])
(import [org.jxls.util JxlsHelper])
(import [org.jxls.common Context])
(require '(clojure.java [io :as io]))
;; http://jxls.sourceforge.net/xls/object_collection_template.xls
View example.clj
(def data
'({:comments "asd"
:expenditure 123.00M
:id 1
:ukcrc_category "Congenital Disorders,"
:year 2017}
{:comments nil
:expenditure 12.00M
:id 2
:ukcrc_category "Cardiovascular"
View examples.md

Docjure

(def sheet1-data [["Name" "Alias" "Frequency" "Average"] ["blue" "B" 45 1] [] ["green" "G" 67 2] ["red" "R" 12 7]])

(def workbook (docjure/create-workbook "Unit Details" sheet1-data))

(def sheet1 (docjure/select-sheet "Unit Details" workbook))

(def yellow-cell-style (docjure/create-cell-style! workbook { :background :yellow }))
View gist:f97ce3aae3ebebce810bc811e57bb159
```
{{ deploy_to }}/shared/log/*.log {
missingok
compress
delaycompress
weekly
rotate 128
copytruncate
create 660 {{ deploy_user }} {{ deploy_user }}
}