Skip to content

Instantly share code, notes, and snippets.

View dalbrekt's full-sized avatar

Tony Dalbrekt dalbrekt

  • https://github.com/dalbrekt/
View GitHub Profile
@dalbrekt
dalbrekt / AsciiDoc.java
Created December 3, 2012 12:10 — forked from mojavelinux/AsciiDoc.java
Execute AsciiDoc from Java using the Jython Interpreter
import java.io.*;
import javax.script.*;
import org.python.core.PySystemState;
import org.python.core.PyString;
import org.python.util.PythonInterpreter;
/**
* This class executes the AsciiDoc python scripts (asciidoc.py and a2x.py) from
* Java using the Jython interpreter.
*
@dalbrekt
dalbrekt / gist:1894937
Created February 23, 2012 20:39 — forked from kritzikratzi/gist:1275419
Another way to use play-morphia blobs
package models;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import play.libs.MimeTypes;
import play.modules.morphia.Blob;