Skip to content

Instantly share code, notes, and snippets.

# HOT DRINKS
## Drip coffee
Choose from a couple of Mother Earth Coffee's best blends.....$2.25
12 oz Breakfast Blend
16 oz Breakfast Blend.........................................$0.50
12 oz Medium Roast
16 oz Medium Roast............................................$0.50
## Cappuccino
Double shot of espresso, steamed milk, and lots of foam.......$3.25
Additional shot...............................................$0.50
@existdissolve
existdissolve / SVGtoPNG
Created August 25, 2013 12:16
SVG to PNG using Batik 1.7: http://xmlgraphics.apache.org/batik/ As written, this works fine when the batik-* jars are added to the ColdFusion class path, but fails when used via JavaLoader. Tried adding the rest of the jars from Batik 1.7 /lib, but doesn't change the outcome.
var response = getPageContext().getFusionContext().getResponse();
response.setContentType( 'image/png' );
var content = fileread( expandPath( "./handlers/test.svg" ) );
var inputStream = createObject("java", "java.io.StringBufferInputStream").init( content );
var input = createObject( "java", "org.apache.batik.transcoder.TranscoderInput").init(inputStream);
var outputStream = response.getOutputStream();;
var output = createObject( "java", "org.apache.batik.transcoder.TranscoderOutput").init(outputStream);
@existdissolve
existdissolve / gist:2587154
Created May 3, 2012 16:47 — forked from DominicWatson/gist:1211688
Some code to make color customization in ColdFusion 9's cfspreadsheet implementation clean
<cfscript>
void function spreadsheetSetCustomPalette(required any workbook, required struct palette){
var customPalette = arguments.workbook.getworkbook().getcustompalette();
var color = "";
var colorIndex = 0;
var rgb = "";
for(color in palette){
try{
colorIndex = CreateObject("java", "org.apache.poi.hssf.util.HSSFColor$#UCase( color )#").GetIndex();