Shown at Feb '14 Den of Clojure
So you've read the blogs and thought how fun it would be to write web front ends with your favorite lisp. Perhaps you've even fired up the repl and done a little playing. But how do you get from there to a
(defn upload! [owner] | |
(let [form (om/get-node owner "upload-form") | |
io (goog.net.IframeIo.)] | |
(goog.events.listen | |
io goog.net.EventType.COMPLETE #(js/console.log "COMPLETE")) | |
(goog.events.listen | |
io goog.net.EventType.SUCCESS (fn [_] | |
(put! | |
(om/get-state owner :reset-file-drop) | |
true) |
Shown at Feb '14 Den of Clojure
So you've read the blogs and thought how fun it would be to write web front ends with your favorite lisp. Perhaps you've even fired up the repl and done a little playing. But how do you get from there to a
(ns three.demo) | |
(def THREE js/THREE) | |
(def camera (THREE.PerspectiveCamera. 75 (/ (.-innerWidth js/window) | |
(.-innerHeight js/window)) 1 10000)) | |
(set! (.-z (.-position camera)) 1000) | |
(def scene (THREE.Scene.)) | |
(def geometry (THREE.CubeGeometry. 200 200 200)) | |
(def obj (js/Object.)) | |
(set! (.-color obj) 0xff0000) | |
(set! (.-wireframe obj) true) |
#EXTM3U | |
#EXTINF:-1,BBC - Radio 1 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p | |
#EXTINF:-1,BBC - Radio 2 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p | |
#EXTINF:-1,BBC - Radio 3 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls | |
#EXTINF:-1,BBC - Radio 4 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p | |
#EXTINF:-1,BBC - Radio 5 live |
(ns media-dog | |
(:require [twitter.oauth :as oauth] | |
[twitter.callbacks.handlers :as handlers] | |
[twitter.api.streaming :as streaming] | |
[cheshire.core :as json]) | |
(:import (twitter.callbacks.protocols AsyncStreamingCallback))) | |
(def creds (oauth/make-oauth-creds | |
; consumer key | |
"CDdirssorFxBYmWWQmM1xw" |
Two terminal windows open, one with a bunch of long running watch tasks, the other with an editor. Each of the terminals is a view into one of two windows in a tmux session. Useful for having a vertically split screen with editor on right, and switching between a browser and other command windows on the left.
In first terminal:
tmux new-session -s first
tmux rename-window editor
emacs
or whateverIn second terminal:
tmux new-session -t first -s second