This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOMEBREW_VERSION: 0.9.2 | |
HEAD: 03744647cc9271abc8c2cb368702fc328ee9a0ec | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: 8-core 64-bit dunno | |
OS X: 10.8-x86_64 | |
Xcode: 4.4 => /Applications/Xcode45-DP2.app/Contents/Developer | |
CLT: 4.5.0.0.1.1249367152 | |
GCC-4.0: N/A | |
GCC-4.2: N/A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.post({ | |
uri: 'https://api.datasift.com/validate', | |
headers: headers, | |
json: JSON.stringify(json)}, function(err, res, body) { console.log(body) }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request.post({ | |
uri: 'https://api.datasift.com/validate', | |
headers: headers, | |
json: JSON.stringify(json)}, function(err, res, body) { console.log(body) }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.report = ƒ(req, res) { | |
var streamHash = req.params.stream; | |
Stream.findById(streamHash, ƒ(err, stream) { | |
var magicalJSON = {}; | |
res.send(200, stream.interactions); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events: { | |
"click #exec-sql": "executeQuery" | |
}, | |
executeQuery: ƒ(event) { | |
var self = this; | |
event.preventDefault(); | |
socket.emit('sqlQuery', { query: 'select * from up_core_flight;' }); | |
socket.on('sqlResults', ƒ(data) { | |
console.log('clic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defhtml layout [& body] | |
(html5 | |
[:head | |
[:title "Reactive"] | |
[:style "canvas { width: 100%; height: 100%;"] | |
(include-css "css/page.css" "css/bootstrap.css") | |
(include-js "js/jquery.min.js" "js/three.js")] | |
[:body | |
(include-js "js/bootstrap.min.js" "js/cljs.js") | |
[:script {:type "text/javascript"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def Camera THREE.Camera) | |
(def PerspectiveCamera THREE.PerspectiveCamera) | |
(def Scene THREE.Scene) | |
(def Renderer THREE.WebGLRenderer) | |
(def Texture THREE.Texture) | |
(def ImageUtils THREE.ImageUtils) | |
(def AdditiveBlending THREE.AdditiveBlending) | |
(def Mesh THREE.Mesh) | |
(def Geometry THREE.Geometry) | |
(def Vertex THREE.Vertex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol IRenderable | |
(setup [this options]) | |
(setup [this options objects]) | |
(render [this renderables])) | |
(defprotocol IAnimatable | |
(animate [this scene camera animatables]) | |
(animate! [this options])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn -main [& args] | |
(let [camera-options | |
(atom {:fov 75 :width js/window.innerWidth | |
:height js/window.innerHeight :near 0.1 :far 1000}) | |
{:keys [fov width height near far]} @camera-options | |
camera (PerspectiveCamera. fov (/ width height) near far) | |
scene (Scene.) | |
renderer (Renderer.) | |
container (-> (sel1 :body) | |
(dommy/set-style! :background-color "#000") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(extend-type Renderer | |
IRenderable | |
(setup [this options] | |
(let [{:keys [width height]} options] | |
(doto this | |
(.setSize width height)))) | |
(render [this renderables] | |
(.render this (first renderables) (second renderables))) | |
IAnimatable | |
(animate [this scene camera animatables] |
OlderNewer