-
These notes accompany a talk I gave on the 9th of October at Tech4Africa 2013.
-
Twitter: @RobStuttaford
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
# Terraform + Ansible | |
## My assumptions about you: | |
- You've used neither of these tools. | |
- You may have used AWS before. | |
- You get the whole infrastructure in the cloud thing. | |
It's already available for you to play with right now — please grab it and ask questions! |
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
AWS_ACCESS_KEY_ID: ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
AWS_SECRET_ACCESS_KEY: supercalifragilisticexpialidocious | |
# more: values | |
# go: here |
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
(when (window-system) | |
(set-default-font "Fira Code")) | |
(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") | |
(35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") | |
(36 . ".\\(?:>\\)") | |
(37 . ".\\(?:\\(?:%%\\)\\|%\\)") | |
(38 . ".\\(?:\\(?:&&\\)\\|&\\)") | |
(42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)") | |
(43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)") | |
(45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)") |
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
;; using Clojure 1.9-alpha7 | |
(ns keys-with-and-question | |
(:require [clojure.spec :as s] | |
[clojure.spec.gen :as gen])) | |
(s/def ::id string?) | |
(s/def ::active? boolean?) | |
(s/def ::extra int?) | |
(s/def ::base (s/keys :req-un [::id] :opt-un [::active?])) |
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
Check out README.md to get started editing Clojure with Emacs. |
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 start-session! | |
[] | |
;; put-value! talks to ring's sessions dsl | |
(put-value! :session-uuid (db/new-uuid))) | |
(defn uuid | |
[] | |
;; get-value talks to ring's sessions dsl | |
(get-value :session-uuid)) |
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
(def conn (d/conn some-uri)) | |
(def some-id 12345) | |
(defn get-v [db] (ffirst (d/q '[:find ?v :in $ ?e :where [?e :some/attribute ?v]] db some-id))) | |
(get-v (d/db conn)) | |
;; => :some-value | |
(def tx [[:db/retract some-id :some/attribute :some-value] |
-
These notes accompany a talk I gave on the 15th of May at the Computer Science Dept of UCT.
-
Slides: https://speakerdeck.com/robertstuttaford/functional-programming-star-isnt-star-scary