Skip to content

Instantly share code, notes, and snippets.

View joeatwork's full-sized avatar

Joe Bowers joeatwork

View GitHub Profile
@joeatwork
joeatwork / readme.txt
Created August 12, 2023 19:59
Félix Denegri in The Embassies Below (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@joeatwork
joeatwork / gist:776ebb88b2cef2304c94
Last active January 23, 2016 02:15
Setting a custom theme for Mixpanel surveys
<!--
Mixpanel surveys rely on a theme to style their dialog boxes. Right now
it's a very, very early theme, to ensure compatibility. If you'd prefer
fancy dialog boxes, you set them up by defining your own theme in the
values/styles.xml file in your application resources.
-->
<!-- this is the current "out of the box" theme for Android surveys,
@joeatwork
joeatwork / chorus.js
Created April 1, 2012 01:34
A simple class for coordinating Javascript callbacks that don't depend on each other, inspired by Polyphonic C#.
window.Chorus = (function() {
// Chorus is a simple way to wait on a group of callbacks that
// don't depend on each other.
//
// var loadManager = Chorus.create();
//
// var roomImage = new Image();
// roomImage.onload = loadManager.addCallback();
// roomImage.src = roomImageURL;
@joeatwork
joeatwork / matrix_to_image.clj
Created March 6, 2012 18:48
Quick and dirty grayscale image to incanter matrix round trip
(import [javax.imageio ImageIO]
[java.awt.image BufferedImage])
(require 'clojure.java.io)
(require 'incanter.core)
(defn read-image-matrix [imagefile]
(let [imagefile (clojure.java.io/as-file imagefile)
raster (.. (. ImageIO read imagefile) getData)
left (. raster getMinX)
@joeatwork
joeatwork / quoted_printable.clj
Created February 16, 2012 16:57
I needed mmencode but didn't have it. Clojure nubware over Apache Geronimo to encode plain text as quoted-printable.
(ns workstationClojure.quoted-printable
(:require [clojure.java.io :as jio])
(:import [java.io ByteArrayOutputStream ByteArrayInputStream]
[org.apache.geronimo.mail.util QuotedPrintableEncoder]))
;; http://geronimo.apache.org/maven/specs/geronimo-javamail_1.4_spec/1.6/apidocs/org/apache/geronimo/mail/util/QuotedPrintableEncoder.html
;; In project.clj,
;; [geronimo/geronimo-mail "1.1"]
;; Geronimo's API is asymmetric, and in somewhat weasily ways, so we