Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Zoramite / jakarta-oro.jar
Created February 7, 2011 14:11
Testing ORO vs custom function
@Zoramite
Zoramite / cfindexPathUrl.cfm
Created February 9, 2011 02:57
Testing the urlPath variable when doing a cfindex with a custom type.
<cfscript>
index action="purge" collection="test";
testQuery = queryNew('key,body,title,something');
for(i = 1; i < 15; i++) {
queryAddRow(testQuery);
querySetCell(testQuery, 'key', i);
querySetCell(testQuery, 'body', 'Testing: ' & i);
@Zoramite
Zoramite / zipDateTest.cfm
Created February 19, 2011 17:25
Testing the isDate() with zip codes that have a +4 code with preceding zeros
<cfdump var="#isDate('12345-0001')#" label="Is Date? 12345-0001" />
<cfdump var="#isDate('12345-0010')#" label="Is Date? 12345-0010" />
<cfdump var="#isDate('12345-0100')#" label="Is Date? 12345-0100" />
<cfdump var="#isDate('12345-1000')#" label="Is Date? 12345-1000" />
@Zoramite
Zoramite / queryCfcTest.cfm
Created March 25, 2011 14:16
Test the sql generated by the query cfc query.
<cfscript>
local.query = new Query(datasource = 'testDatasource');
local.query.setSql('
INSERT INTO testTable
(
type,
message
) VALUES (
:type,
@Zoramite
Zoramite / index.cfm
Created May 25, 2011 17:18
JavaLoader can't convert [java.lang.Double] to [int[]] example
<cfscript>
paths = [];
paths[1] = expandPath("./tagsoup-1.2.jar");
loader = createObject("component", "javaloader/JavaLoader").init(paths);
</cfscript>
@Zoramite
Zoramite / cicada.css
Created June 7, 2011 21:20
Cicada + CSS Backgrounds
.example1 {
background-color: #efefef;
background-image:
-webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image:
-moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%),
@Zoramite
Zoramite / index.cfm
Created July 16, 2011 00:44
Railo Method Not Defined When Using Shared Scopes Test
<cfif not structKeyExists(application, 'openIDConsumer') or structKeyExists(url, 'reinit')>
<cfset application.openIDConsumer = createObject('java', 'org.openid4java.consumer.ConsumerManager', expandPath('./openid4java.jar')).init() />
</cfif>
<cfset openIDConsumer = application.openIDConsumer />
<cfset discoveries = openIDConsumer.discover('https://www.google.com/accounts/o8/id') />
<cfset discovered = openIDConsumer.associate(discoveries) />
@Zoramite
Zoramite / index.cfm
Created August 13, 2011 02:46
Testing cfscript tag attribute override variables
<cfscript>
template = {
test: 'true'
};
include template="test.cfm";
writeDump(template); // Outputs: test.cfm
</cfscript>
@Zoramite
Zoramite / index.cfm
Created August 21, 2011 00:40
cfscript missing { after if statement outputs text instead of parsing as component
<cfset test = createObject('component', 'test') />
<cfoutput>#test.test()#</cfoutput>
@Zoramite
Zoramite / bubbles.txt
Created September 30, 2011 16:16
Homemade Bubbles
Homemade Bubbles:
1 1/2 quarts of water
1/2 cup light corn syrup
1 cup liquid dish soap
Add water and corn syrup and stir until completely mixed. Slowly stir in dish soap. Store in an airtight container.