View query.cfm
This file contains 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
<cfscript> | |
query name="getData" { | |
``` | |
<cfsavecontent variable="sql"> | |
SELECT * FROM test WHERE id = | |
</cfsavecontent> | |
``` | |
writeOutput(sql) | |
``` | |
<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="101"> |
View mixed.cfm
This file contains 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
<cfscript> | |
```<!--- | |
make | |
hyper text | |
transfer | |
protocol | |
request | |
--->``` | |
http |
View daftery.cfm
This file contains 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
<cfset level = 0> | |
<cfscript> | |
level++ | |
``` | |
<cfoutput>Hello from level #level#<br></cfoutput> | |
<cfscript> | |
level++ | |
``` | |
<cfoutput>Hello from level #level#<br></cfoutput> | |
<cfscript> |
View isObjectLuceeBungnessTest.cfm
This file contains 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
<cfscript> | |
function run() { | |
describe("Comparing behaviour of isObject across CF and Lucee", () => { | |
describe("Tests using isObject", () => { | |
describe("Tests when argument is scoped", () => { | |
var isObjectChecker = (component object) => isObject(arguments.object) | |
it("is a baseline happy path", () => { | |
var o = new Http() | |
expect(isObjectChecker(o)).toBeTrue() |
View Numbers.cfc
This file contains 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=Controller { | |
function init() { | |
filters("getHeadersForRequest") | |
} | |
function getHeadersForRequest() { | |
variables.headers = getHttpRequestData().headers | |
} |
View result.out
This file contains 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
Tags | |
[#arguments.x#] [2] | |
Script | |
[#arguments.x#] [#arguments.x#] |
View build.gradle.kts
This file contains 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
val ktor_version: String by project | |
val kotlin_version: String by project | |
val logback_version: String by project | |
plugins { | |
application | |
kotlin("jvm") version "1.7.20" | |
id("io.ktor.plugin") version "2.1.2" | |
} |
View trycf-gist-1663831519549-108be4c3-5b4d-d6dc-ca88-c0d8e48bcdb6.cfm
This file contains 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
<cfscript> | |
s = "12345678901234567890" | |
writeDump([ | |
"s" = s, | |
"val(s)" = val(s), | |
"s.getClass().getName()" = s.getClass().getName(), | |
"val(s).getClass().getName()" = val(s).getClass().getName() | |
]) | |
d = 12345678901234567890 |
View code.cfm
This file contains 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
function index( event, rc, prc ){ | |
prc.pageTitle = "Reset Password"; | |
if( isEmpty( rc?.user ) || isEmpty( rc?.token ) ) { | |
return event.setView( "resetpassword/malformedurl" ); | |
} | |
var rows = getInstance( "User" ).firstWhere( "id", rc.user ); | |
if( isNull( rows ) ) { | |
return event.setView( "resetpassword/malformedurl" ); |
View testHarness.cfm
This file contains 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
<cfscript> | |
cfhttp( | |
method = "get", | |
url = "https://gist.githubusercontent.com/adamcameron/816ce84fd991c2682df612dbaf1cad11/raw/tinyTestFramework.cfm", | |
result = "frameworkCodeResponse", | |
throwOnError = true | |
); | |
frameworkCode = frameworkCodeResponse.fileContent; |
NewerOlder