This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
void function Configure() {} | |
boolean function afterAspectsLoad(required any event, required struct interceptData){ | |
var Tracker = new whoson.WhosonTracker(); | |
getColdboxOCM().set('WhosOn', Tracker, 0); | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Register interceptors as an array, we need order | |
interceptors = [ | |
//SES | |
{class="coldbox.system.interceptors.SES", | |
properties={} | |
} | |
//WhosOn | |
,{class="whoson.ColdBoxInterceptor", | |
properties={} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component name="WhosonTracker" { | |
function init(){ | |
variables.clients = []; | |
return this; | |
} | |
function trackHit(required Event){ | |
var updateFlag = 0; | |
var userCount = arrayLen(variables.clients); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends="coldbox.system.web.context.RequestContextDecorator" { | |
public void function configure(){ | |
var rc = getRequestContext().getCollection(); | |
var prc = getRequestContext().getCollection(private = true); | |
if(!structKeyExists(session, 'memberGUID')){ | |
session['memberGUID'] = getController().getSetting('defaultMemberGUID'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>Simple Chat</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="messageContainer" style="display: none;"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
property name = "SQSService" inject = "model"; | |
public function sendMessage(required string message) { | |
SQSService.sendMessage(queue = "test", message = arguments.message); | |
return; | |
} | |
public function startQueue() { | |
cfthread(name = "sqs-poll", action = "run", SQSService = SQSService) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
/* | |
Parts of this are based on Tim Dawe's | |
http://amazonsig.riaforge.org | |
and | |
Joe Danziger's Amazon S3 REST Wrapper | |
http://amazons3.riaforge.org/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component{ | |
// Configure ColdBox Application | |
function configure(){ | |
// coldbox directives | |
coldbox = { | |
//Application Setup | |
appName = "Appname", | |
eventName = "event", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msgDetails = { | |
to="[email protected]", | |
from="[email protected]", | |
subject="example subject", | |
parts = [ | |
{type="text/plain", body="This is plain text..."}, | |
{type="text/html", body="<strong>bold</strong> text..."} | |
] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
Many thanks to Sean Corfield and Ryan Guill who set me down the correct path of java.util.TimeZone | |
---> | |
<cfscript> | |
writeDump(label="Conversion Examples",var={ | |
"0-local-tz": getSystemTZ() | |
,"1-local-now": now() | |
,"2-utc-now": toUTC(now()) | |
,"3-eastern-now": TZtoTZ( getSystemTZ(), now(), "America/New_York" ) |