This file contains hidden or 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-package posframe) | |
(use-package mini-frame | |
:after posframe | |
:demand | |
:custom | |
(mini-frame-show-parameters | |
(lambda() | |
(let* ((width 1000) | |
(height 300) |
This file contains hidden or 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
(ns cauchy-clojure.core | |
(:require [clojure.core.match :as cm] | |
[clojure.math.numeric-tower :refer [abs]])) | |
(defn rat [x] | |
[:rat x]) | |
(defn rat-val [x] | |
(second x)) |
This file contains hidden or 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
(defun custom/toggle-notes () | |
(interactive) | |
(if (string= "notes.org" (buffer-name (current-buffer))) | |
(spacemacs/alternate-buffer) | |
(find-file "~/Dropbox/notes/notes.org"))) | |
(global-set-key [f12] #'custom/toggle-notes ) |
This file contains hidden or 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
(ns puppetlabs.puppetdb.scf.storage | |
"Catalog persistence | |
Catalogs are persisted in a relational database. Roughly speaking, | |
the schema looks like this: | |
* resource_parameters are associated 0 to N catalog_resources (they are | |
deduped across catalogs). It's possible for a resource_param to exist in the | |
database, yet not be associated with a catalog. This is done as a | |
performance optimization. |
This file contains hidden or 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
2017-02-23 13:09:54,814 DEBUG [nREPL-worker-7] [p.t.internal] Initializing lifecycle worker loop. | |
2017-02-23 13:09:54,816 DEBUG [Hikari connection adder (pool PDBReadPool)] [c.z.h.p.HikariPool] PDBReadPool - Added connection org.postgresql.jdbc.PgConnection@38522fc0 | |
2017-02-23 13:09:54,817 DEBUG [Hikari connection adder (pool PDBWritePool)] [c.z.h.p.HikariPool] PDBWritePool - Added connection org.postgresql.jdbc.PgConnection@aff599e | |
2017-02-23 13:09:54,821 DEBUG [Hikari connection adder (pool PDBWritePool)] [c.z.h.p.HikariPool] PDBWritePool - Added connection org.postgresql.jdbc.PgConnection@438a6b1 | |
2017-02-23 13:09:54,822 DEBUG [Hikari connection adder (pool PDBReadPool)] [c.z.h.p.HikariPool] PDBReadPool - Added connection org.postgresql.jdbc.PgConnection@3695c6ba | |
2017-02-23 13:09:54,825 DEBUG [Hikari connection adder (pool PDBWritePool)] [c.z.h.p.HikariPool] PDBWritePool - Added connection org.postgresql.jdbc.PgConnection@732ee | |
2017-02-23 13:09:54,833 DEBUG [Hikari connection adder (pool PDBWritePool)] [c.z |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "boxcutter/ol73" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.memory = "4096" | |
end |
This file contains hidden or 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 shovel [n to xf from type] | |
(assert (pos? n)) | |
(let [join-chs (->> (range n) | |
(map (fn [n] | |
(case type | |
:blocking (async/thread | |
(loop [] | |
(when-let [in-val (<!! from)] | |
(doseq [out-val (sequence xf [in-val])] |
This file contains hidden or 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 ^:skip-wiki encoding-of-spec-impl | |
"Do not call this directly, use 'encoding-of'" | |
[inner-pred-form inner-pred | |
inner->outer-fn outer->inner-fn | |
gfn] | |
(let [inner-spec (delay (s/specize* inner-pred inner-pred-form))] | |
(reify | |
s/Specize | |
(specize* [s] s) | |
(specize* [s _] s) |
This file contains hidden or 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
(ns clj-automated-reasoning.core-match | |
(:require [clojure.core.match :as cm])) | |
(defn simplify1 [e] | |
(cm/match [e] | |
[(['+ 0 x] :seq)] x | |
[(['+ x 0] :seq)] x | |
[(['* x 1] :seq)] x | |
[(['* 1 x] :seq)] x | |
[(['* x 0] :seq)] 0 |
This file contains hidden or 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
(ns vintage-clojure.aceyducy) | |
(defn format-card [n] | |
(cond | |
(< n 11) (str n) | |
(= 11 n) "JACK" | |
(= 12 n) "QUEEN" | |
(= 13 n) "KING" | |
(= 14 n) "ACE")) |
NewerOlder