Skip to content

Instantly share code, notes, and snippets.

View iantruslove's full-sized avatar

Ian Truslove iantruslove

View GitHub Profile

A carousel is a representation of actions cards, with an optional image card and a title.

Actions for a carousel are represented by an ActionsCollection.

Since these collections of actions aren't necessarily rendered via a carousel, the ActionsCollection DTO is independent of front end concerns.

type Action = {

Keybase proof

I hereby claim:

  • I am iantruslove on github.
  • I am iantruslove (https://keybase.io/iantruslove) on keybase.
  • I have a public key ASCHv0Fr-8GYr23bj7u5BqSAnBn1sbMe_ayza9qIWzjx9Qo

To claim this, I am signing this object:

(ns specfoo.core
(:require [clojure.spec.gen.alpha :as gen]
[clojure.spec.alpha :as s]))
(distinct (remove coll? (gen/sample (s/gen any?) 100)))
@iantruslove
iantruslove / profiles.clj
Last active January 20, 2018 02:31
Clojure debugging: local setup
;; ~/.lein/profiles.clj
{:user {:source-paths ["/Users/ian/.lein/src"]
:injections [(require 'spyscope.core)]
:dependencies [[evalive "1.1.0"]
[spyscope "0.1.7-SNAPSHOT"]]
}}
@iantruslove
iantruslove / patch-sexp-fu.txt
Created June 28, 2017 16:57
Fixing the "‘preceding-sexp’ is an obsolete function (as of 25.1)" emacs startup error
Check out this (sadly unmerged) PR:
https://github.com/hchbaw/eval-sexp-fu.el/pull/3/files
replacing preceding-sexp with elisp--preceding-sexp by danielschranz · Pull Request #3 · hchbaw/eval-sexp-fu.el
This is to avoid the obsolete warning in Emacs 25.1 (see: http://doc.endlessparentheses.com/Fun/preceding-sexp.html)
find your eval-sexp-fu source file, and patch it - there's 2 replacements of preceding-sexp with elisp--preceding-sexp
the file is something like ~/.emacs.d/elpa/eval-sexp-fu-20131230.1351/eval-sexp-fu.el
@iantruslove
iantruslove / ring-example.md
Last active April 21, 2016 23:31
Ring Webapp Example
@iantruslove
iantruslove / Den-of-Clojure-intro-1-talk.md
Last active April 9, 2021 01:37
Den of Clojure - Intro to Clojure part 1

A gentle introduction to Clojure

Lisp Cycles (XKCD 297 / https://xkcd.com/297/)

Ian Truslove

Den of Clojure

2016-04-21


@iantruslove
iantruslove / noco-webscale-clojure-intro-talk.md
Last active April 21, 2016 21:50
Clojure intro talk outline

A gentle introduction to Clojure

Lisp Cycles (XKCD 297 / https://xkcd.com/297/)

Ian Truslove

NoCo Web Scale

2015-12-01


@iantruslove
iantruslove / math-test.clj
Last active October 13, 2015 14:38
Numerically stable math
(ns jupiter.test.utils.math
(:require [clojure.test :refer :all]
[jupiter.utils.math :refer :all]))
(defn float=
([x y] (float= x y 0.000001))
([x y epsilon]
(let [scale (if (or (zero? x) (zero? y)) 1 (Math/abs x))]
(<= (Math/abs (- x y)) (* scale epsilon)))))
@iantruslove
iantruslove / DoC-sep-2015-Jupiter.org
Last active September 10, 2015 23:49
Den of Clojure | Real Projects | Jupiter

Den of Clojure

REAL PROJECTS

Jupiter

Den of Clojure, 2015-09-10

Ian Truslove@iantruslove