Skip to content

Instantly share code, notes, and snippets.

View jwhitlark's full-sized avatar

Jason Whitlark jwhitlark

View GitHub Profile
@jwhitlark
jwhitlark / gist:5831b282ecce8e15d1e6
Last active August 29, 2015 14:02
Simple clock in Om
(defn clock-view [app owner]
(reify
om/IWillMount
(will-mount [_]
(js/setInterval
(fn [] (om/transact! app :time (fn [_] (js/Date.))))
100))
om/IRender
(render [_]
(dom/div nil (. (:time app) toUTCString)))))
@jwhitlark
jwhitlark / gist:1228206
Created September 20, 2011 02:58
Rake as a library, from anywhere in the filesystem
#! /usr/bin/env ruby
require 'rubygems'
gem 'rake', '>= 0.7.3'
require 'rake'
Dir.chdir('where/I/want/to/be')
Rake.application.init('my-script-name')
(ns org.whitlark.fc
(:import [org.apache.camel.impl DefaultCamelContext])
(:import [org.apache.camel.builder RouteBuilder])
(:gen-class))
(defn -main [& args]
(let [context (DefaultCamelContext.)]
(.addRoutes context (proxy [RouteBuilder] []
(configure []
(.. this (from "file:/home/jw/scratch/inbox?noop=true")