Skip to content

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

View GitHub Profile
(ns game
(:import Vector3
[UnityEngine Resources]
MonoBehaviour IEnumerator WaitForSeconds Time)
(:use
arcadia.core
hard.core))
(defn wait [n] (WaitForSeconds. n))
(ns skin.core
(:require [clojure.walk :as walk]))
(defn- datatype? [v] (or (sequential? v) (set? v) (map? v)))
(defn css-value [v]
(cond (symbol? v) v
(list? v) v
(keyword? v) (apply str (rest (str v)))
(number? v) (str v)
(defpdfn read)
(pdfn read [env k params]
{env (comp (is* :join) :type :ast)}
(let [{:keys [query ast state]} env
get-fn (if (ident? (:key ast)) get-in get)]
{:value (om/db->tree query (get-fn @state (:key ast)) @state )}))
(pdfn read [env k params] {k #{:inventory/by-id}}
{:value (get-in @(:state env) (:query-root env) {})})
(defproject final "0.1.0-SNAPSHOT"
:description "pro design tool for html/css"
:url "https://github.com/selfsame/final"
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.8.51" :scope "provided"]
[org.clojure/core.async "0.2.374"]
[com.cognitect/transit-cljs "0.8.237"]
[org.omcljs/om "1.0.0-alpha35"]
[reagent "0.6.0-alpha2" :exclusions [cljsjs/react]]
@selfsame
selfsame / fs.js
Created May 6, 2016 18:37 — forked from nasser/fs.js
var fs = {
read: (filename, cb, err) => {
navigator.webkitPersistentStorage.requestQuota(0, (bytes) => {
window.webkitRequestFileSystem(PERSISTENT, bytes, (fs) => {
fs.root.getFile(filename, {},
(entry) => {
entry.file((file) => {
var reader = new FileReader();
if(err)
reader.onerror = err;
(ns user
(:require [clojure.pprint :as pprint])
(:use
arcadia.core
hard.core
tween.core
pdfn.core)
(import ArcadiaState))
(comment
(ns user
(:require [clojure.pprint :as pprint])
(:use
arcadia.core
hard.core
tween.core
pdfn.core))
(require '[clojure.pprint :as pprint])
Error loading /mnt/C/game-builds/the-dims/linux-universal_Data/Plugins/x86/ScreenSelector.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Selecting FBConfig
GLX_FBCONFIG_ID=167
GLX_BUFFER_SIZE=32
GLX_DOUBLEBUFFER=1
GLX_RED_SIZE=8
GLX_GREEN_SIZE=8
GLX_BLUE_SIZE=8
GLX_ALPHA_SIZE=8
function download(name){
var res = []
Array.prototype.map.call(document.querySelectorAll("img"), function(e){
res.push(e.getAttribute("src"))})
var a = document.createElement("a")
a.href = URL.createObjectURL(new Blob([JSON.stringify(res)], {type:"text/json"}))
a.download = name + ".json"
a.click()}
slide.markdown ul{list-style:none;}
ul li:before{
position:absolute;
line-height:0.5em;
font-size:1.75em;
margin: -0.2em 0em 0em -0.8em;
}
ul li:before {content: "\21B3";}