Skip to content

Instantly share code, notes, and snippets.

View virtix's full-sized avatar
💭
I may be slow to respond.

bill shelton virtix

💭
I may be slow to respond.
View GitHub Profile
@virtix
virtix / CFrunt.g.js
Created November 15, 2010 17:51
keeping notes.
grammar CFrunt;
options {
backtrack=true;
memoize=true;
}
@header {
package org.foo.bar;
}
<cfscript>
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* CF9/ColdDoc script for generating static html MXUnit api docs.
* ColdDoc is by Mark Mandel and is included in this MXUnit distribtion.
*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
import mxunit.framework.Assert;
<cfcomponent extends="mxunit.framework.TestCase">
<cfscript>
/**
* Assume cut has two methods: calculate() and getDataFromDatabase().
* getDataFromDatabase() goes to a Db, which we want to control, and
* calculate() calls getDataFromDatabase(). We want to stub only getDataFromDatabase().
*
* This "partial" mocking allows one to run tests on a component and mock specific methods
* in that component.
*/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>adam-c-gists</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.cfeclipse.cfml.CFENature</nature>
/*
*
* This is a great muffin recipe, from "Are You Hungry Tonight, Elvis' Favorite Recipes"
*
* */
(function(){
var programmer = new Programmer();
var dry_ingredients = {};
var wet_ingredient = {};
package edu.gmu.mut4j;
import static edu.gmu.mut4j.Mut4JAssertions.*;
import java.util.HashMap;
import org.junit.Test;
public class ExampleDBMutationTest {
@Test
/**
Prints some meta data about PreparedStatement parameters
*/
import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
; TextPad syntax definitions for Hadoop Pig
C=1
[Syntax]
Namespace1 = 6
IgnoreCase = No
KeyWordLength =
BracketChars = {[()]}
OperatorChars = -+*/<>!~%^&|=?:
<cfcomponent>
<cfscript>
//Hmmm .... how can we flatten without using state?
{buffer = [];}
function flatten(a){
var dup = [];
buf = [];
_flatten(a);
dup.addAll(buffer);
import org.apache.commons.mail.*
mail_server = 'mail.server'
def send_mail = { cnt,sender,recipient,headers ->
println 'sending mail ' + cnt
email = new SimpleEmail();
email.setHostName mail_server
email.addTo recipient, 'to_' + cnt