Skip to content

Instantly share code, notes, and snippets.

@m-ou-se
m-ou-se / clock.scad
Last active December 11, 2016 12:48
3D model for my whiteboard clock
$fs=1;
$fa=1;
servo_l = 24;
servo_w = 13;
servo_h = 21;
bolt_hole_diameter = 4.5;
servo_axis_diameter = 4;

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@fbellomi
fbellomi / gist:9832211d53bd0a1dd49b
Last active August 29, 2015 14:14
Pretty printer for core.typed annotations
(defn pp-type [f]
(if (and (sequential? f) (<= 3 (count f)) (symbol? (first f)) (= (name (first f)) "All"))
(str "(All " (pr-str (second f)) "\n " (str/join "\n " (str/split (pp-type (nth f 2)) #"\n" )) ")")
(if (and (sequential? f) (<= 3 (count f)) (symbol? (first f)) (= (name (first f)) "IFn"))
(str "(IFn " (str/join "\n " (map pr-str (rest f))) ")")
(pr-str f))))
(defn pretty-print-type [f]
(-> (pp-type f)
(ns variant
(:require [clojure.core.typed :as t]))
(t/defalias V
(t/Rec [V]
(t/U '[':lambda t/Sym V]
'[':if V V V]
'[':val t/Any])))
(t/ann command [V -> t/Str])
@timsgardner
timsgardner / quaternion_exploration.clj
Last active July 13, 2016 01:21
Playing around with quaternions in Arcadia
(ns quaternion-exploration
(:import [UnityEngine Quaternion Vector3])
(:use arcadia.core
arcadia.hydrate
clojure.repl
clojure.pprint))
;; like emacs. kind of.
(defn kill! [x]
(let [spec (dehydrate x)]
@akiatoji
akiatoji / Clojure_on_RaspberryPi_OSX.md
Last active December 3, 2022 21:15
Running Clojure on Raspberry Pi with OS X

Clojure on Raspberry Pi with OS X

"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.

Install JDK

  • Download ARM JDK from Oracle and instlal on Raspberry Pi
  • Change visudo to contain the following
(ns biology.core
(:use hard.core hard.input hard.tween unity.messages)
(:require unity.core))
(defn scene-spermwhale [_]
(add [(find-name "Main Camera") :y] -3000 3 (fn [_] (load-scene "spermwhale"))))
(defn scene-options [_]
(add [(find-name "Main Camera") :x] -20 1 (fn [_] (load-scene "spermwhale"))))
@jackrusher
jackrusher / drum-circle.clj
Created August 17, 2014 14:40
A little Godfried Toussaint inspired polyrhythmic drum toy online at http://jackrusher.com/drum-circle/
(ns drum-machine.core
(:require [om.core :as om :include-macros true]
[sablono.core :as html :refer-macros [html]]))
(enable-console-print!)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; UI
(def tau 6.2831853071)
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing