Skip to content

Instantly share code, notes, and snippets.

View lygaret's full-sized avatar

Jonathan Raphaelson lygaret

View GitHub Profile
@lygaret
lygaret / graphix.clj
Created July 8, 2010 04:54
attempt at easy swing graphics in cloj
(ns typoet.graphix
(:import [javax.swing JFrame])
(:import [java.awt Dimension Canvas])
(:import [java.awt.event WindowAdapter KeyAdapter MouseAdapter MouseMotionAdapter])
(:use [clojure.contrib.seq-utils]))
(defstruct window :height :width :title :frame :canvas :handlers)
(defn- get-handlers
[window key]
@lygaret
lygaret / rpcmacro.clj
Created July 8, 2010 04:52
quick macro for creating and running xmlrpc clients
(ns rpcmacro
(:import [java.net URL])
(:import [org.apache.xmlrpc XmlRpcException])
(:import [org.apache.xmlrpc.client XmlRpcClient XmlRpcClientConfigImpl XmlRpcCommonsTransportFactory XmlRpcSunHttpTransport XmlRpcSunHttpTransportFactory])
(:import [org.apache.commons.httpclient HttpClient HttpState])
(:use [clojure.contrib.pprint]))
(defn mk-client [url]
(let [config (XmlRpcClientConfigImpl.)
client (XmlRpcClient.)
@lygaret
lygaret / diffrecurse.py
Created March 3, 2010 20:17 — forked from dakrone/diffrecurse.py
recursive diff
#!/usr/bin/env python
import os
import sys
from os.path import join
expectedFiles = []
actualFiles = []
returnValue = 0
expectedFolder = sys.argv[1]