Skip to content

Instantly share code, notes, and snippets.

View aamedina's full-sized avatar

Adrian Medina aamedina

View GitHub Profile
@aamedina
aamedina / brew --config
Created July 16, 2012 12:11
installing postgresql via homebrew issue
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
request.post({
uri: 'https://api.datasift.com/validate',
headers: headers,
json: JSON.stringify(json)}, function(err, res, body) { console.log(body) });
request.post({
uri: 'https://api.datasift.com/validate',
headers: headers,
json: JSON.stringify(json)}, function(err, res, body) { console.log(body) });
exports.report = ƒ(req, res) {
var streamHash = req.params.stream;
Stream.findById(streamHash, ƒ(err, stream) {
var magicalJSON = {};
res.send(200, stream.interactions);
});
}
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
(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"}
(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)
(defprotocol IRenderable
(setup [this options])
(setup [this options objects])
(render [this renderables]))
(defprotocol IAnimatable
(animate [this scene camera animatables])
(animate! [this options]))
(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")
(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]