Skip to content

Instantly share code, notes, and snippets.

@JacobNinja
JacobNinja / pipeline.clj
Last active April 6, 2022 09:14
Clojure core.async pipeline example
(require '[clojure.core.async :as async]
'[clj-http.client :as client]
'[clojure.data.json :as json])
(def concurrency 5)
(let [in (async/chan)
out (async/chan)
request-handler (fn [url out*]
(async/go
@jbt
jbt / desk.coffee
Last active August 29, 2015 13:56
Desk.com hubot script
# hubot script for desk
module.exports = (robot) ->
robot.router.post "/hook/desk", (req, res) ->
body = req.body.data
lines = body.split "\n"
data = {}
lines.forEach (line) ->
bits = line.split ":"
data[bits.shift()] = bits.join ":"
@teropa
teropa / resources.md
Last active December 4, 2020 05:42
Clojure Resources

Tutorials

(ns net.cgrand.decay
"Exponentially decaying lists. See http://awelonblue.wordpress.com/2013/01/24/exponential-decay-of-history-improved/
for background and http://clj-me.cgrand.net/2013/02/12/decaying-lists-log-scale-for-lists/ for documentation")
;; PRNG, formulas straight from java.util.Random javadoc
(defn- seed ^long [^long n]
(bit-and (unchecked-multiply n 0x5DEECE66D)
(unchecked-dec (bit-shift-left 1 48))))
(defn- next-seed ^long [^long seed]
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: