Skip to content

Instantly share code, notes, and snippets.

@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 June 1, 2011 23:21
Railo XMLSearch with xmlns attribute test
<cfset tests = [
xmlParse('<?xml version="1.0"?> <html><body><ul><li>foo</li><li>bar</li></ul></body></html>'),
xmlParse('<?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><body><ul><li>foo</li><li>bar</li></ul></body></html>')
] />
<cfloop array="#tests#" index="i">
<cfset results = xmlSearch(i, '/html/body/ul/li') />
<cfdump var="#results#" />
</cfloop>
@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 / 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 / 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 / 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 / jakarta-oro.jar
Created February 7, 2011 14:11
Testing ORO vs custom function
@Zoramite
Zoramite / svnRemove.sh
Created February 6, 2011 18:25
Remove all .svn directories from the current directory and all sub directories.
find . -name ".svn" -exec rm -rf {} \;
@Zoramite
Zoramite / example.htm
Created February 5, 2011 15:27
jQuery snippet to open external links in a new window
<!doctype html>
<html>
<head>
<title>External Links Example</title>
</head>
<body>
<h1>External Links Example</h1>
<div class="newWindow">
<p>
@Zoramite
Zoramite / datagrid.cfc
Created February 3, 2011 06:58
Railo multiple variables scope bug
<cfcomponent output="false">
<cfscript>
public component function init() {
variables.columns = [];
variables.extend = createObject('component', 'extend').init();
return this;
}
public void function addColumn(struct options = {}) {