Skip to content

Instantly share code, notes, and snippets.

<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script>
@Zoramite
Zoramite / RailoByteSize.cfm
Created October 22, 2010 04:42
Testing the calculation of the byte size of a string in Railo.
<cfoutput>
<cfset temp = createUUID() />
<div>
UUID: #temp#
</div>
<div>
Size of UUID: #sizeOf(temp)#
</div>
@Zoramite
Zoramite / dynamicCalls.cfc
Created December 15, 2010 18:41
Calling a function on a component dynamically.
<cfcomponent output="false">
<cffunction name="testing" access="public" returntype="string" output="false">
<cfargument name="value" type="string" required="true" />
<cfreturn '<strong>' & arguments.value & '</strong>' />
</cffunction>
</cfcomponent>
@Zoramite
Zoramite / fileDownload.cfm
Created December 16, 2010 05:12
Test downloading a file using http
<cfset source = 'https://github.com/seancorfield/fw1/tarball/v1.2' />
<cfset downloadPath = './' />
<cfset downloadFile = 'test.tar.gz' />
<cfhttp url="#source#" method="get" file="#downloadFile#" path="#downloadPath#" getAsBinary="true" />
@Zoramite
Zoramite / sortableCopy.css
Created January 4, 2011 17:58
Testing the ability to ctrl + drag to copy a sortable element
* {
margin: 0;
padding: 0;
}
ul,
ol {
list-style: none;
}
@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 = {}) {
@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 / 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 / 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);