Skip to content

Instantly share code, notes, and snippets.

@roryl
roryl / closing_tag_bodies.cfm
Last active June 6, 2016 12:56
Lucee Syntax overview
<cfsavecontent variable="myContent">
Output some text
</cfsavecontent>
@roryl
roryl / array_literal.cfm
Last active April 11, 2016 12:29
Lucee Script Quick Reference
<cfscript>
myArray = ["value1", "value2"];
</cfscript>
@roryl
roryl / Application.cfc
Last active May 3, 2016 13:29
Lucee Dynamic Evaluation
component {
this.mappings["/temp"] = "ram://";
}
@roryl
roryl / create_java.cfm
Last active June 6, 2016 12:55
Lucee - Integrating with native Java libraries
<cfscript>
javaArray = createObject("java", "java.util.ArrayList");
</cfscript>
@roryl
roryl / IMyInterface.cfc
Last active March 13, 2016 05:34
Lucee Interfaces
interface {
public function myFunc(required string myString){
}
public function myOtherFunc(required array myArray){
}
@roryl
roryl / basicComponent.cfc
Last active April 5, 2016 12:32
Lucee - Reflection Capabilities
component {
public function myFunc(){
}
public function myOtherFunc(){
}
}
@roryl
roryl / placeholder.cfm
Last active March 15, 2016 14:46
Lucee System Placeholders
<cfscript>
echo(expandPath('{lucee-web}') & "<br />"); //C:\Users\Rory\.CommandBox\server\A9F9212AEA00D070AA3482E81E747F69-luceebook
echo(expandPath('{lucee-server}') & "<br />"); //C:\Users\Rory\.CommandBox\engine\cfml\server\lucee-server\context
echo(expandPath('{lucee-config}') & "<br />"); //C:\Users\Rory\.CommandBox\server\A9F9212AEA00D070AA3482E81E747F69-luceebook
echo(expandPath('{temp-directory}') & "<br />"); //C:\Users\Rory\.CommandBox\server\A9F9212AEA00D070AA3482E81E747F69-luceebook\temp
echo(expandPath('{home-directory}') & "<br />"); //C:\Users\Rory
echo(expandPath('{system-directory}') & "<br />"); //C:\Windows\System32
echo(expandPath('{web-root-directory}') & "<br />"); //C:\websites\luceebook
echo(expandPath('{web-context-hash}') & "<br />"); //C:\websites\luceebook\examples\system_placeholders\a9f9212aea00d070aa3482e81e747f69
echo(expandPath('{web-context-label}') & "<br />"); //C:\websites\luceebook\examples\system_placeholders\a9f9212aea00d070aa3482e81e747f69
@roryl
roryl / NotSample.cfc
Last active August 11, 2016 19:29
Lucee Array Examples
// NotSample.cfc
component {
}
@roryl
roryl / .gitmodules
Last active June 6, 2016 12:56
Lucee Struct Examples
[submodule "database_session_storage"]
path = database_session_storage
url = https://gist.github.com/roryl/44f730ecd8ba2593b03e45f1189fcf5f
@roryl
roryl / queryTests.cfc
Last active March 16, 2016 00:03
Lucee Query Object Examples
/**
* My xUnit Test
*/
component extends="testbox.system.BaseSpec"{
/*********************************** LIFE CYCLE Methods ***********************************/
// executes before all test cases
function beforeTests(){
}