Skip to content

Instantly share code, notes, and snippets.

View timsgardner's full-sized avatar

Tims Gardner timsgardner

  • Arcadia Technologies
  • Brooklyn, NY
View GitHub Profile
.class public auto ansi 'magic$$car-scene$maths$$go-to-1d$$271'
extends [Clojure]clojure.lang.AFunction
implements class [Interfaces]Function`5<float32, float32, float32, float32, float32>,
class [Interfaces]Function`5<object, object, object, object, object>
{
// Methods
.method public specialname rtspecialname
instance void .ctor () cil managed
{
// Method begins at RVA 0x2788
@timsgardner
timsgardner / datascript_java_grep.bash
Created March 16, 2017 23:55
datascript java grep
$ grep -rn "[jJ]ava" .
./bench/bench:2:exec java -cp "$HOME/.m2/repository/org/clojure/clojure/1.7.0/clojure-1.7.0.jar" clojure.main "$0" "$@"
./bench/bench:9: '[clojure.java.io :as io]
./bench/bench:10: '[clojure.java.shell :as sh]
./bench/bench:19:(defn copy [^java.io.InputStream input ^java.io.Writer output]
./bench/bench:21: in (java.io.InputStreamReader. input "UTF-8")
./bench/bench:22: w (java.io.StringWriter.)]
./bench/bench:134: in (java.io.PushbackReader. in0)]
./bench/bench:136: new (read-all (java.io.PushbackReader. (java.io.StringReader. new)))
./bench/src/datascript/perf.cljc:4: #?(:clj clojure.java.shell))
1530607724139521508932980875366164142801837824054189028944864276501513771167587600095322633469334060697594202672502749961944743386391606887302279668065211279573541866917228916299315209627653220078391622979176410193364243845537900677380974133847622777677903096356014134623625699043224978458976004702954223788060883272125916680598528434738351693047148835634930997998929840001972316872609848414437370874718346837626197127545989568614088027039279081535665893816237753181148854195037674432409225641223463255185108153401822549062560746883349181404892813838227096504971061318982702566965423871865438277372212972186007565056986963809456598643236740281012361481300399798154819521492730328010449049129720140983782418574485004056638831104283349325024489469502334088470871791604832128703947500572010518941573733384297472415678647216138549993779701036074111322276419479925396949134399252190167375011656105690428461473517417044939774386806905408158508503759685681571292598058791232708654049329076589749560210109853534614479228147571506697
look some images
@timsgardner
timsgardner / lab_Instructions.md
Created February 6, 2017 22:06
lab instructions

LAB!!!

FROM A NEW JAVASCRIPT FILE:

  • Make a grid of empty divs (optionally using flexbox) (if you aren't using flexbox, you don't have to make a grid, a column of divs will do)

  • Make a clickable palette of elements, each of which shows a color

  • When each of these elements is clicked, it should set a variable called "currentColor" to the color of the clicked element

@timsgardner
timsgardner / scene_var.clj
Last active December 21, 2016 06:51
scene-var!
(ns timsg.scene-var
(:refer-clojure :exclude [def])
(:use [arcadia.core])
(:require [clojure.spec :as s]
[clojure.core :as c]
[arcadia.internal.spec :as as])
(:import [UnityEngine GameObject Component]))
;; ============================================================
;; much simpler way, just uses def and vars
@timsgardner
timsgardner / prob-cond.clj
Created November 10, 2016 06:20
prob cond
(defmacro prob-cond [& clauses]
(let [valsym (gensym "val_")
test-vals (reductions + (take-nth 2 clauses))]
`(let [~valsym (* ~(last test-vals) (rand))]
(cond
~@(mapcat (fn [tv clause] `[(<= ~valsym ~tv) ~clause])
test-vals
(take-nth 2 (rest clauses)))))))
(prob-cond

Episode 7: A New Terminal

A long time ago in a Unix environment far, far away, young Jedi padawans who knew only of desktop software were seduced by the dark side of the Force to enter… The Terminal.

Follow the instructions below using all the console commands introduced in Fundamentals, class, or that you find on your own.

Set the Scene

  1. Open the Terminal app
  2. Change directories to todays directory d03.
@timsgardner
timsgardner / protocols_test.clj
Last active October 6, 2016 01:41
protocols test
(defprotocol IBlubso
(flubmo [this]))
(def c1 (clojure.lang.RT/classForName "user.IBlubso"))
(defn blubber []
(reify user.IBlubso
(flubmo [this]
:hi-there)))