Skip to content

Instantly share code, notes, and snippets.

<cfscript>
a = 1;
b = "1";
c = true;
d = "true";
e = "yes";
if (a) dump("a == true? => yes");
if (b) dump("b == true? => yes");
if (c) dump("c == true? => yes");
<cfscript>
a = 1;
b = "1";
c = true;
d = "true";
if (a) dump("a == true => yes");
if (b) dump("b == true => yes");
if (c) dump("c == true => yes");
if (d) dump("d == true => yes");
<cfset str = "###### G5624">
<cfdump var="#left(str,6)#">
<cfscript>
a = {b: 2};
a.a = a.a ?: (a.b - 1);
a.a = a.a ?: (a.b - 2);
a.a = a.a ?: (a.b - 3);
writeDump(a);
<cfscript>
writeDump(
LSIsDate( "2024年1月14日", "en-US" )
);
</cfscript>
<cfscript>
function foo(forceError = false) {
try {
if (forceError) {
throw('Oopsie! An Error')
}
return [{a: 'test'}, {}]
} catch(any e) {
return [{}, e]
<cfscript>
thisTag = { executionMode = "start" };
result = isDefined( "thisTag.executionMode" );
writeDump( result )
</cfscript>
<cfset a= 10>
<cfdump var="#a#">
<cfset variables.message = "Error 1"
<cfset variables.ignoreErrors = [
["Invalid terminal"]
]>
<cfset variables.containsIgnoredError = variables.ignoreErrors.some(function(strings){
return strings.every(function(str) {
return findNoCase(str, variables.message) > 0;
<cfscript>
passencrypt = createobject("java", "lucee.runtime.crypt.BlowfishEasy").init("sdfsdfs")
x=passencrypt.decryptstring('34204f91ccc44008522bfb0fb0a0f00e603db5ed95fcc3c962b82160a8ddce70946741ed56335ce2')
dump(x)
x=passencrypt.encryptstring('password_test')
dump(x)
</cfscript>