Skip to content

Instantly share code, notes, and snippets.

@rakhmad
rakhmad / clojure.md
Created April 17, 2012 15:55
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@dhm116
dhm116 / ie.shims.js
Created February 10, 2012 15:14
IE7/8 Javascript method shims
'use strict';
// Add ECMA262-5 method binding if not supported natively
//
if (!('bind' in Function.prototype)) {
Function.prototype.bind= function(owner) {
var that= this;
if (arguments.length<=1) {
return function() {
return that.apply(owner, arguments);
@drewbourne
drewbourne / Model.as
Created February 2, 2012 22:35
FlexUnit Parameterized Test with Mockolate
package flexunit.example.parameterized
{
public class Model
{
public function calculate(... args):Number
{
return NaN;
}
}
}
@weitzj
weitzj / build.gradle
Created January 9, 2012 00:17
groovy, java, intellij IDEA setup
/**
* Initial build.gradle script to wrap groovy/java scripts into one fat jar file.
* (including some nice tools for scripting: GROOVY, GPARS, LOG4J, ANTBUILDER, CLI-PARSER)
*
* Project Setup via:
* gradle makeDirs
*
*
* IntelliJ IDEA integration:
* gradle idea
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@gregglind
gregglind / fabfile.py
Created September 9, 2011 16:59
Fabfile for PyMNtos September 2011 Meeting
#!/usr/bin/env python
"""
Example fabfile for PyMNtos September 2011 meeting.
some examples of usage:
$ fab -H somehost -- uname -a
$ fab -H somehost run:'uname -a'
$ fab -d example
@ryancrum
ryancrum / jquerytest.cljs
Created July 21, 2011 02:24
How to use jQuery from ClojureScript
(ns jquerytest.core)
(def jquery (js* "$"))
(jquery
(fn []
(-> (jquery "div.meat")
(.html "This is a test.")
(.append "<div>Look here!</div>"))))
@drewbourne
drewbourne / CreateMockolatesManually.as
Created June 21, 2011 03:30
Mockolate FlexUnit Setup Examples
package example
{
import flash.events.Event;
import mockolate.mock;
import mockolate.nice;
import mockolate.prepare;
import org.flexunit.assertThat;
import org.flexunit.async.Async;
@r-moeritz
r-moeritz / hello.clj
Created June 16, 2011 19:09
hello jwt in clojure : hello.clj
(ns jwt-examples.hello)
(defmacro create-listener [args & body]
(let [argsnum (if (< 0 (count args)) (count args) "") ]
`(proxy [ ~(symbol (str "Signal" argsnum "$Listener")) ] [] (trigger ~args ~@body))))
(import [eu.webtoolkit.jwt WObject Signal WApplication WBreak WtServlet
WEnvironment WLineEdit WPushButton WText Signal$Listener Signal1
EventSignal WWidget Side]
[java.util EnumSet])