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
#!/usr/bin/env clj | |
(defn get-bars | |
[xml] | |
(loop [xml xml | |
bars []] | |
(if (clojure.string/blank? xml) | |
bars | |
(let [[_ bar xml2 :as r] (clojure.string/split xml #"<bar>|</bar>" 3)] | |
(if (nil? bar) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
config.vm.guest = :freebsd | |
config.vm.box = "freebsd/FreeBSD-10.2-RELEASE" |
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
#!/bin/sh | |
app="cipher" | |
version="0.9.2" | |
java="/usr/local/bin/java" | |
daemon="/usr/sbin/daemon" | |
app_home="/home/vagrant/apps/${app}" | |
jar="${app}-${version}-standalone.jar" |
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
CLJ_NREPL_PORT:=22340 | |
CLJS_JAR_VERSION:=1.7.48 | |
CLJS_JAR_URL:=https://github.com/clojure/clojurescript/releases/download/r$(CLJS_JAR_VERSION)/cljs.jar | |
.PHONY: def_target | |
def_target : null | |
# http://blog.jgc.org/2015/04/the-one-line-you-should-add-to-every.html |
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
Compiling ClojureScript... | |
Exception in thread "main" java.lang.VerifyError: (class: cljs/util$last_modified, method: invokeStatic signature: (Ljava/lang/Object;)Ljava/lang/Object;) Can only throw Throwable objects, compiling:(util.cljc:142:1) | |
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:468) | |
at clojure.lang.Compiler.eval(Compiler.java:6948) | |
at clojure.lang.Compiler.load(Compiler.java:7390) | |
at clojure.lang.RT.loadResourceScript(RT.java:372) | |
at clojure.lang.RT.loadResourceScript(RT.java:363) | |
at clojure.lang.RT.load(RT.java:453) | |
at clojure.lang.RT.load(RT.java:419) | |
at clojure.core$load$fn__5436.invoke(core.clj:5869) |
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
(ns afile.gambit-3 | |
(:refer-clojure :exclude [deref]) | |
(:require | |
[clojure.edn :as edn] | |
[clojure.pprint :refer [pprint]] | |
[clojure.core.async :refer [go <! put! chan]] | |
[clojure.test :refer [deftest is run-tests]])) | |
(defn- load-file! | |
[file init-value] |
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
(ns afile.gambit-1 | |
(:refer-clojure :exclude [deref]) | |
(:require | |
[clojure.edn :as edn] | |
[clojure.pprint :refer [pprint]] | |
[clojure.test :refer [deftest is run-tests]])) | |
(defn- load-file! | |
[file init-value] | |
(if (.exists file) |
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
(ns afile.core | |
(:refer-clojure :exclude [deref]) | |
(:require | |
[clojure.edn :as edn] | |
[clojure.pprint :refer [pprint]] | |
[clojure.test :refer [deftest is run-tests]])) | |
(defn- load-file! | |
[fname init-value] | |
(let [f (java.io.File. fname)] |
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
(ns afile.core | |
(:require | |
[clojure.edn :as edn] | |
[clojure.pprint :refer [pprint]] | |
[clojure.test :refer [deftest is run-tests]])) | |
(defn- load-file! | |
[fname init-value] | |
(let [f (java.io.File. fname)] | |
(if (.exists f) |
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
var frustum = new THREE.Frustum(); | |
var cameraViewProjectionMatrix = new THREE.Matrix4(); | |
// every time the camera or objects change position (or every frame) | |
camera.updateMatrixWorld(); // make sure the camera matrix is updated | |
camera.matrixWorldInverse.getInverse( camera.matrixWorld ); | |
cameraViewProjectionMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); | |
frustum.setFromMatrix( cameraViewProjectionMatrix ); |