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
package edu.gmu.mut;
import java.util.ArrayList;
import java.util.Calendar;
/**
* Class Account represents an immutable customer account.
*/
public class Account {
@virtix
virtix / selenium_with_python.rst
Created August 5, 2011 04:27 — forked from baijum/selenium_with_python.rst
Selenium with Python

Selenium with Python

Author: Baiju Muthukadan
Email:baiju.m.mail AT gmail.com
Version: 0.5.0
@virtix
virtix / LoyaltyDiscountTest.java
Created April 14, 2011 08:41
Original mutation-based test generation
package edu.gmu.mut.test;
import static org.junit.Assert.*;
import org.junit.Test;
import edu.gmu.mut.Account;
import edu.gmu.mut.Discount;
import edu.gmu.mut.GenreDiscount;
import edu.gmu.mut.LoyaltyDiscount;
import edu.gmu.mut.Purchase;
package edu.gmu.mut;
public class Loyalty {
/**
* Given a a number representing the total dollar amount
* of purchases, this returns some discount
* */
@virtix
virtix / A-Emailer.java
Created February 23, 2011 14:38
Dependency example
package edu.gmu;
import java.util.List;
import org.apache.log4j.*;
public class Emailer {
public void sendEmail(List<Recipient> recipients, String message){
EmailService service = new EmailService();
service.connect();
@virtix
virtix / Balisong.cfc
Created January 31, 2011 20:36
Balisong.cfc
cfcomponent {
public any function filter(string predicate, any collection){
if( isArray(collection) ) return _filterArray(predicate,collection, [] );
if( isStruct(collection) ) return _filterStruct(predicate,collection, {} );
return collection;
}
//slightly different implementation for arrays
public any function _filterArray(string predicate, array collection, array accumulator){
layout title published draft draft_message pub_date
post
An Immutable Object Strategy in ColdFusion
true
false
_DRAFT - Subject to change_
February 1, 2011

{% if page.draft } %(draft){{ page.draft_message }} {%endif%}

@virtix
virtix / sql_expression.g
Created January 19, 2011 21:23
description here?
grammar E;
options {
backtrack = true;
memoize = true;
output = AST;
ASTLabelType = CommonTree;
}
tokens {
; TextPad keyword syntax file for CFML9
; Author: virtix
; Feel free to distribute.
C=1
[Syntax]
Namespace1 = 6
IgnoreCase = Yes
KeyWordLength = 0
BracketChars = []{}
@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;
}