Skip to content

Instantly share code, notes, and snippets.

View josephwilk's full-sized avatar
💭
💻 🎨 🎵

Joseph Wilk josephwilk

💭
💻 🎨 🎵
View GitHub Profile
@meh
meh / lol.exs
Created December 16, 2013 17:29
defmodule Fun do
def arity(fun) do
case :erlang.fun_info(fun, :arity) do
{ :arity, arity } ->
arity
end
end
def adapt!(fun, 0) do
fn -> fun.([]) end
@jackrusher
jackrusher / heart-murmur.clj
Last active December 24, 2015 16:09
My first attempt at an aleatoric composition with Overtone. An example of the audio output is here: https://soundcloud.com/jackrusher/heart-murmur
(ns overtone-playground.heart-murmur
(:use overtone.core
overtone.inst.sampled-piano
overtone.samples.piano))
;; (boot-server)
;; (sampled-piano)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Reproducible randomness
defmodule Punk do
def hip? do
true
end
def hop? do
hip?
end
end
@weavejester
weavejester / gist:5484183
Created April 29, 2013 19:45
jMonkeyEngine in Clojure example
(ns jme3-example.core
(:import com.jme3.app.SimpleApplication
com.jme3.material.Material
com.jme3.math.Vector3f
com.jme3.scene.Geometry
com.jme3.scene.shape.Box
com.jme3.texture.Texture))
(defn application
"Create an jMonkeyEngine application."
@daveray
daveray / hystrix.txt
Created January 3, 2013 13:43
Hystrix-clj
Functions for defining and executing Hystrix dependency commands and collapers.
The definition of commands and collapers is separated from their instantiation and execution.
They are represented as plain Clojure maps (see below) which are later instantiated into
functional HystrixCommand or HystrixCollapser instances.
A command definition map can be passed to the execute, and queue functions
to invoke the command.
HystrixCommand