Skip to content

Instantly share code, notes, and snippets.

Joel Boehland jolby

Block or report user

Report or block jolby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jolby
jolby / java_interop.clj
Created May 23, 2019 — forked from kylewlacy/java_interop.clj
Small DSL for making Java classes in Clojure, using ASM
View java_interop.clj
; Based on https://gist.github.com/athos/1033052
(ns cljl.java-interop
(:require [clojure.string :as str])
(:import (clojure.asm Opcodes Type ClassWriter)
(clojure.asm.commons Method GeneratorAdapter)))
(def ^:dynamic *version* Opcodes/V1_6)
(def modifier->opcode
@jolby
jolby / Ambly app delegate
Last active Aug 29, 2015
Creating JSContext for Ambly
View Ambly app delegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
// Loading JavaScript code - uncomment the one you want.
// OPTION 1
// Load from development server. Start the server from the repository root:
//
// $ npm start
@jolby
jolby / REPL_session.clj
Created Aug 6, 2011
Working load-externs function for closure.clj (Clojurescript)
View REPL_session.clj
cljs.closure> (load-externs {})
[#<JSSourceFile externs.zip//es3.js> #<JSSourceFile externs.zip//es5.js> #<JSSourceFile externs.zip//w3c_event.js> #<JSSourceFile externs.zip//w3c_event3.js> #<JSSourceFile externs.zip//gecko_event.js> #<JSSourceFile externs.zip//ie_event.js> #<JSSourceFile externs.zip//webkit_event.js> #<JSSourceFile externs.zip//w3c_dom1.js> #<JSSourceFile externs.zip//w3c_dom2.js> #<JSSourceFile externs.zip//w3c_dom3.js> #<JSSourceFile externs.zip//gecko_dom.js> #<JSSourceFile externs.zip//ie_dom.js> #<JSSourceFile externs.zip//webkit_dom.js> #<JSSourceFile externs.zip//w3c_css.js> #<JSSourceFile externs.zip//gecko_css.js> #<JSSourceFile externs.zip//ie_css.js> #<JSSourceFile externs.zip//webkit_css.js> #<JSSourceFile externs.zip//google.js> #<JSSourceFile externs.zip//deprecated.js> #<JSSourceFile externs.zip//fileapi.js> #<JSSourceFile externs.zip//flash.js> #<JSSourceFile externs.zip//gears_symbols.js> #<JSSourceFile externs.zip//gears_types.js> #<JSSourceFile externs.zip//gecko_xml.js> #
@jolby
jolby / core.cljs
Created Aug 2, 2011
Clojurescript on Appcelerator Titanium
View core.cljs
(ns tiexample.core)
(defn ^{:export dbg} dbg [s]
(js* "Titanium.API.debug(~{s})"))
;;stolen from another gist I saw
(defn make-js-map
"makes a javascript map from a clojure one"
[cljmap]
(let [out (js-obj)]
@jolby
jolby / core.clj
Created Apr 22, 2010
Using com.evocomputing.colors with incanter to get semantic colors
View core.clj
(ns colorstats.core
(:use
(com.evocomputing [colors :only [create-color awt-color]])
(incanter [charts :only [line-chart set-stroke set-stroke-color bar-chart]]
[core :only [view]]
[datasets :only [get-dataset]])
(clojure.contrib [seq-utils :only [indexed]]))
(:require
[com.evocomputing.colors.palettes.core :as core-palettes]
[com.evocomputing.colors.palettes.color-brewer :as color-brewer]))
You can’t perform that action at this time.