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
| ;; Middleware is a way to define a stack of operations applied to a function | |
| ;; call. It's a common pattern for parsing and handling http requests. A | |
| ;; handler function is wrapped by a middleware function. Let's narrow in on | |
| ;; http handling, then: | |
| ;; Let's call a 'handler function' a function that accepts as its input a | |
| ;; request, and returns a response. | |
| (defn my-handler-fn [request] | |
| {:status 200 :body "42"}) |
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
| {:nov-21 | |
| [["9:00AM - 9:10AM" {:speaker "Welcome"}] | |
| ["9:10AM - 9:50AM" | |
| [{:speaker "Derek Troy-West", | |
| :title "Follow the Data: Product Development in Clojure", | |
| :link "http://2019.clojure-conj.org/speaker-derek-troy-west/"}]] | |
| ["10:00AM - 10:40AM" | |
| [{:speaker "Ariel Ortiz", | |
| :title "The Hitchhikers Guide to Multiparadigm Programming", | |
| :link "http://2019.clojure-conj.org/speaker-ariel-ortiz/"}]] |
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 super-sratch.minstack) | |
| (defprotocol Stack (push [this x]) (peek [this]) (pop [this])) | |
| (defprotocol FindMin (find-min [this])) | |
| (defprotocol FindMax (find-max [this])) | |
| (defrecord fmm-stack [stack minstack maxstack] | |
| Stack | |
| (push [this x] | |
| (merge this {:stack (vec (conj stack 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
| import CoreGraphics | |
| var display_id = CGMainDisplayID(); | |
| // "BGRA" | |
| print(display_id); |
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
| import CoreGraphics | |
| var display_id = CGMainDisplayID(); | |
| print(display_id); |
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
| import CoreGraphics | |
| var id = CGMainDisplayID(); | |
| print(id); |
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
| import CoreGraphics | |
| Any id = CGMainDisplayID(); | |
| print(id) |
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
| # focus window | |
| shift + cmd - a : chunkc tiling::window --focus west | |
| shift + cmd - s : chunkc tiling::window --focus south | |
| shift + cmd - w : chunkc tiling::window --focus north | |
| shift + cmd - d : chunkc tiling::window --focus east | |
| # warp window | |
| shift + cmd - j : chunkc tiling::window --warp west | |
| shift + cmd - k : chunkc tiling::window --warp south | |
| shift + cmd - i : chunkc tiling::window --warp north |