Skip to content

Instantly share code, notes, and snippets.

@roryl
roryl / Application.cfc
Last active June 6, 2016 12:54
Lucee Cache Cluster
component {
}
@roryl
roryl / Application.cfc
Last active November 11, 2021 15:14
Lucee Database Client Storage
component {
this.datasources["lucee_sessions"] = {
class: 'org.gjt.mm.mysql.Driver'
, connectionString: 'jdbc:mysql://192.168.33.10:3306/lucee_sessions?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true'
, username: 'lucee_sessions'
, password: "encrypted:8c3ea865feab8133a7614f58aee150cddee0ed6f82a476f1"
// optional settings
, storage:true // default: false
@roryl
roryl / Application.cfc
Last active April 28, 2017 08:30
Lucee Database Session Storage
component {
this.datasources["lucee_sessions"] = {
class: 'org.gjt.mm.mysql.Driver'
, connectionString: 'jdbc:mysql://192.168.33.10:3306/lucee_sessions?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true'
, username: 'lucee_sessions'
, password: "encrypted:8c3ea865feab8133a7614f58aee150cddee0ed6f82a476f1"
// optional settings
, storage:true // default: false
@roryl
roryl / .gitignore
Last active June 6, 2016 12:55
Lucee Java Compilation Example
/*.class
@roryl
roryl / basicComponent.cfc
Last active August 8, 2016 12:03
Lucee Serialization Examples
component {
this.foo = "bar";
function init(){
//Do something on instantiation
return this;
}
}
@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(){
}
@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 / NotSample.cfc
Last active August 11, 2016 19:29
Lucee Array Examples
// NotSample.cfc
component {
}
@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 / basicComponent.cfc
Last active April 5, 2016 12:32
Lucee - Reflection Capabilities
component {
public function myFunc(){
}
public function myOtherFunc(){
}
}