Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
hi

Angus Fletcher angusiguess

💭
hi
View GitHub Profile
View gist:10475462
### Keybase proof
I hereby claim:
* I am angusiguess on github.
* I am angusiguess (https://keybase.io/angusiguess) on keybase.
* I have a public key whose fingerprint is 0400 A17C ABF4 6A17 B4F1 4C45 F574 8AFC 47A9 D5AF
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am angusiguess on github.
  • I am angusiguess (https://keybase.io/angusiguess) on keybase.
  • I have a public key whose fingerprint is 2589 3CEF 0D8D BCDE 6A3F 1936 E5A3 7899 63DD CBDD

To claim this, I am signing this object:

@angusiguess
angusiguess / stm-talk.clj
Created Feb 26, 2013
Supporting code for a talk on STM in Clojure
View stm-talk.clj
(ns stm-talk.core)
;;This creates our ledger
(def ledger (ref {}))
(defn journal
"Apply a debit and credit simultaneously to a given account."
[debit credit amount]
(dosync
(when (nil? (@ledger debit)) (alter ledger assoc debit 0))
@angusiguess
angusiguess / sephirot.sh
Last active Feb 11, 2016
What's Kanye's album called?
View sephirot.sh
# TLOP by speaking the sefirot.
while [ "$tlop" != "the life of Pablo" ];
do
tlop=$(echo `grep "^[tT].*" /usr/share/dict/american-english | shuf -n 1` `grep "^[lL].*" /usr/share/dict/american-english | shuf -n 1` `grep "^[oO].*" /usr/share/dict/american-english| shuf -n 1` `grep "^[pP].*" /usr/share/dict/american-english| shuf -n 1`)
echo $tlop
sleep 2
done
View forth.clj
(ns forth.core
(:require [clojure.edn :as edn]
[clojure.string :as str]
[clojure.core :as c])
(:refer-clojure :exclude [read pop + - * /]))
;; Every function in the runtime operates on env, stack and returns env, stack, ret
;; Where env is a dict of lookups to functions
;; Let's cheat and lean on clojure's reader for a bunch of stuff. for example
@angusiguess
angusiguess / component.org
Created Feb 9, 2017
Component, What and Why
View component.org

Component: What and Why

Problem:

At some point when you’re building a clojure app or a service, you realize that you’ve got a lot of things that refer to external dependencies. These can be database connections, loggers, metrics publishers, etc.

When I started building apps I’d just pass these dependencies into routes or go-loops or other semi-stateful parts of my system and call it a day.

@angusiguess
angusiguess / biblio.md
Last active Nov 17, 2019
Emulators, Immutability, and Time Travel
View biblio.md