Skip to content

Instantly share code, notes, and snippets.

@puppybits
puppybits / .circleci___config.yml
Last active November 13, 2018 20:42
Parallelized Circle CI pipeline to build/deploy Re-Natal (w/ React Native & Om Next) project and upload DSYM to Sentry
version: 2
references:
ios_config: &ios_config
macos:
xcode: "9.4.1"
working_directory: ~/my-project
environment:
FL_OUTPUT_DIR: output # for Fastlane
build_filter: &build_filter
@borkdude
borkdude / cljscript
Last active July 4, 2018 16:34
Execute all in one clj script
deps=`awk '/^;; deps.edn$/{flag=1;next}/^;; end deps.edn$/{flag=0}flag' $1`
script=`awk '/^;; script$/{flag=1;next}/^;; end script$/{flag=0}flag' $1`
clj -Sdeps "$deps" -e "$script"
@mfikes
mfikes / elide.md
Last active February 14, 2018 14:21
(Ab)using constant Boolean's for conditional compilation

The goal is to have the spec-related code conditionally elided from the below for prod builds:

(ns my-app.core
  (:require [clojure.spec.alpha :as s]
            [my-app.config :as config]))

(defn new-machine
  [opts]
@cgrand
cgrand / set-game.clj
Last active November 15, 2021 16:42
the SET game in clojure.spec
;; the SET game in clojure.spec
;; inspired by https://github.com/jgrodziski/set-game
(require '[clojure.spec :as s])
(s/def ::shape #{:oval :diamond :squiggle})
(s/def ::color #{:red :purple :green})
(s/def ::value #{1 2 3})
(s/def ::shading #{:solid :striped :outline})
(s/def ::card (s/keys :req [::shape ::color ::value ::shading]))
@allgress
allgress / reagent_datascript.cljs
Last active February 16, 2023 21:16
Test use of DataScript for state management of Reagent views.
(ns reagent-test.core
(:require [reagent.core :as reagent :refer [atom]]
[datascript :as d]
[cljs-uuid-utils :as uuid]))
(enable-console-print!)
(defn bind
([conn q]
(bind conn q (atom nil)))