Skip to content

Instantly share code, notes, and snippets.

@jobez
jobez / chromelessyoutubemeteor
Created May 28, 2013 07:43
rudimentary attempt of implementing chromeless youtube player in meteor
if (Meteor.isClient) {
function updateHTML(elmId, value) {
document.getElementById(elmId).innerHTML = value;
}
// This function is called when an error is thrown by the player
function onPlayerError(errorCode) {
alert("An error occured of type:" + errorCode);
}
#!/bin/sh
#create meteor project
mrt create "$1"
#revise priors
sudo rm "$1".js
sudo rm "$1".html
sudo rm "$1".css
@jobez
jobez / gist:5991194
Created July 13, 2013 16:10
voodoojs 3d text object issue
iView = voodoo.View.extend({
load: function() {
/*
TODO: Create your THREE.js objects here and
add them to the scene.
*/
this.geometry = new THREE.OctahedronGeometry(200, 2);
this.material = new THREE.MeshBasicMaterial({
wireframe: true
@jobez
jobez / test
Created July 29, 2013 16:25
this is a test!
# the only markdown syntax i know from memory
@jobez
jobez / core.cljs
Last active August 29, 2015 13:56
(ns select.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true])
(:import [goog.ui IdGenerator] ;; unique id goodness
))
(defn guid []
(.getNextUniqueId (.getInstance IdGenerator)))
(enable-console-print!)
@jobez
jobez / text-1.1.1.1.log
Created May 1, 2014 22:36
cabal install text-1.1.1.1 receives fatal error: too many errors emitted, stopping now [-ferror-limit=] 29 warnings and 20 errors generated.
Configuring text-1.1.1.1...
/var/folders/44/z7wkzmk56h9gpnm5lmh7zvjw0000gn/T/6291.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building text-1.1.1.1...
Preprocessing library text-1.1.1.1...
(defproject saphograph "0.1.0"
:description "mentat network"
:url ""
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2197"]]
:node-dependencies []
:plugins [[lein-npm "0.4.0"]
[lein-cljsbuild "1.0.3"]]
:hooks [leiningen.cljsbuild]
:cljsbuild {

we make a jsc env with a reload special function

(in-ns 'reload-env)

(defrecord reloadJscEnv [response-promise bonjour-name webdav-mount-point socket options]
  repl/IReplEnvOptions
  (-repl-options [this]
    {:require-foreign true
     :special-fns {'reload! (fn self
                             ([repl-env env form]
@jobez
jobez / scratch2.org
Last active December 8, 2015 09:28
scratch2.org

render function

(let [renderf (fn [data]
                      (binding [*reconciler* this
                                *shared*     (merge
                                               (:shared config)
                                               (when (:shared-fn config)
                                                 ((:shared-fn config) data)))]
                        (let [c (cond
                                  (not (nil? target)) ((:root-render config) (rctor data) target)
(ns ^:figwheel-load query-test.ios.core
(:require-macros [env.require-img :refer [require-img]]
[natal-shell.components :refer [view text switch-ios
image scroll-view touchable-highlight
text-input navigator]])
(:require [datascript.core :as d]
[cljs.pprint :as pprint]
[om.next :as om :refer-macros [defui ui]]
[cljs-time.core :as cljs-time]))