createMessageDispatcher
creates a message listener which will call a method on the
handler
argument, based on the contents of the message that's passed from elsewhere.
It does this by injecting the (potentially error causing) method into a promise chain,
by sticking it inside a custom thenable,
which gives us much nicer error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-m markdown | |
--private | |
--protected | |
--embed-mixins | |
--default-return void | |
**/*.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-m markdown | |
--private | |
--protected | |
--embed-mixins | |
--default-return void | |
**/*.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: IE={box} vagrant up | |
# | |
# Eg. IE=XPIE6 vagrant up | |
boxes = { | |
"XPIE6" => "http://aka.ms/vagrant-xp-ie6", | |
"XPIE8" => "http://aka.ms/vagrant-xp-ie8", | |
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7", | |
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8", | |
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Watch and rank links coming from twitter's public timeline. | |
# Currently this doesn't really work all that well, as we can only get 20 | |
# tweets a minute, but it's an idea. | |
# Requires the following non-standard python libs: (install with easy_install) | |
# * simplejson | |
# * functional | |
# * sqlalchemy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Name: vimproject.vim | |
" Version: 0.1 | |
" Author: Jon Raphaelson | |
" Summary: Loads a project specific vimrc when starting vim inside that | |
" project's directory tree. | |
" Licence: This program is free software; you can redistribute it and/or | |
" modify it under the terms of the GNU General Public License. | |
" See http://www.gnu.org/copyleft/gpl.txt | |
" Section: Documentation {{{1 | |
" Description: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package video; | |
import java.awt.Image; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.DataBuffer; | |
import java.awt.image.WritableRaster; | |
import quicktime.QTRuntimeException; | |
import quicktime.QTRuntimeHandler; | |
import quicktime.QTSession; | |
import quicktime.qd.PixMap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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.) |