Skip to content

Instantly share code, notes, and snippets.

View Sorrop's full-sized avatar

Chris K. Sorrop

  • https://kleene.ai/
  • Berlin, Germany
View GitHub Profile
@ericnormand
ericnormand / 00_script.clj
Last active January 6, 2024 07:13
Boilerplate for running Clojure as a shebang script
#!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {clj-time {:mvn/version "0.14.2"}}}
'
#_You can put other options here
OPTS='
@mfikes
mfikes / file_io.clj
Created September 9, 2018 15:28
Async file io in Clojure
(ns api-server.file-io
(:use [clojure.tools.logging :only (info warn error)])
(:import (java.nio.channels CompletionHandler AsynchronousFileChannel)
(java.nio ByteBuffer)
(java.nio.file.attribute FileAttribute)
(java.nio.file StandardOpenOption)
(java.util.concurrent Executors))
(:require [clojure.core.async :as async :refer [chan go put! close!]]
[clojure.java.io :as io]))
@staltz
staltz / introrx.md
Last active April 24, 2024 19:47
The introduction to Reactive Programming you've been missing