Skip to content

Instantly share code, notes, and snippets.

View owenallenaz's full-sized avatar

Owen Allen owenallenaz

View GitHub Profile
@owenallenaz
owenallenaz / application.cfc
Created October 29, 2012 03:39
Scheduling in Coldfusion without cfschedule, server access, or the Coldfusion Administrator
component {
this.name = "testingApp";
public function onApplicationStart() {
// counter to prove the cron.cfm is firing
application.counter = 0;
}
public function onRequestEnd() {
// specify an index for the cache
@owenallenaz
owenallenaz / application.cfc
Created October 21, 2012 19:02
Performance testing coldfusion - the importance of the debugger
component {
this.name = "testingApp";
public function onRequestStart() {
Application.component1 = CreateObject("component1");
Application.component2 = CreateObject("component2");
Application.component3 = CreateObject("component3");
}
}
@owenallenaz
owenallenaz / application.cfc
Created September 5, 2012 00:52
Throw this in a folder and execute index.cfm and you'll see a multiple datasource error, even though only one datasource is used inside the cftransaction.
<cfcomponent>
<cfset this.name = "mySpecialApp">
<cfset this.datasource = "rc_cms">
<cfset this.ormEnabled = true>
<cffunction name="onError">
<cfdump var="#arguments#">
</cffunction>
</cfcomponent>