Skip to content

Instantly share code, notes, and snippets.

@daveduthie
daveduthie / sokuza-kanren.scm
Created February 14, 2017 16:10 — forked from Pet3ris/sokuza-kanren.scm
Mini-kanren like logic programming in Scheme
; Quick miniKanren-like code
;
; written at the meeting of a Functional Programming Group
; (Toukyou/Shibuya, Apr 29, 2006), as a quick illustration of logic
; programming. The code is really quite trivial and unsophisticated:
; it was written without any preparation whatsoever. The present file
; adds comments and makes minor adjustments.
;
; $Id: sokuza-kanren.scm,v 1.1 2006/05/10 23:12:41 oleg Exp oleg $
@daveduthie
daveduthie / 00_destructuring.md
Created February 21, 2017 08:29 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

; Church Numerals in Clojure
;
; Church numerals use anonymous functions to represent numbers.
;
; ((zero f) x) -- returns x
; ((one f) x) -- return (f x)
; ((two f) x) -- return (f (f x))
; ...
(def zero (fn [f] (fn [x] x)))
@daveduthie
daveduthie / Ansible-Vault how-to.md
Created October 10, 2017 07:28 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@daveduthie
daveduthie / README.md
Created July 20, 2018 21:39 — forked from bhb/README.md
Clojure friendly mode, inspired by https://github.com/slipset/friendly
@daveduthie
daveduthie / SketchSystems.spec
Last active October 18, 2022 11:58 — forked from ryanlucas/SketchSystems.spec
Debicheck mandate
Debicheck mandate
Some starting state
Confirm signatures -> Signatures confirmed
A parallel FSM&
Document FSM
Signatures confirmed
Upload FICA docs -> FICA docs uploaded
FICA docs uploaded