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
| <!--- | |
| 11/8/2025 19:45:05 | |
| Custom Tag "thisTag" scope test. | |
| Call this as a custom tag using a CFTag or cfscript | |
| <cf_TestCustomTag> | |
| or | |
| cf_TestCustomTag(); | |
| ---> |
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
| <cfscript> | |
| // How do CFML platforms increase an integer? Is datatype/class faithfully retained? | |
| // 2025-10-24 (Updated 2025-10-29 with more tests) | |
| // by James Moberg - www.myCFML.com | |
| // NOTE: Test this on TryCF.com (CFFiddle doesn't allow the use of getMetaData.) | |
| test = [ | |
| "platform": (server.keyexists("boxlang")) ? "BoxLang" : server.coldfusion.productname, | |
| x: javacast("int", 0) | |
| ]; |
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
| <!--- 2025-10-06 15:22:49-07 | |
| In response to LinkedIn question from Ben Nadel: | |
| https://www.linkedin.com/feed/update/urn:li:activity:7381052444270567425/ | |
| NOTE: All executions using "cftag (cfscript)" result in both start/end executions being triggered. | |
| FIX: To avoid being double executed in cfscript, we modify the cftag/cfmodule to exit early if `thisTag.executionMode=end` | |
| on implmentations that don't make use of `thisTag.GeneratedContent`. | |
| ---> | |
| <cfparam name="url.TestType" default="cfml"> |
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
| <!--- | |
| 7/31/2025 | |
| Related to Adobe Tracker bug report CF-4227330 (https://tracker.adobe.com/#/view/CF-4227330) | |
| ---> | |
| <!--- Add this check to the top of the script in case it's called using cfscript | |
| or it will be executed twice as "self-closing cfscript" doesn't appear to be supported. ---> | |
| <cfif isdefined("thisTag.executionMode") && thisTag.executionMode eq "end"> | |
| <cfexit> | |
| </cfif> |
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
| <!--- 2025-06-30 Passing Attributes via CFThread | |
| TWEET: https://x.com/gamesover/status/1939722382379471155 | |
| The offical Adobe ColdFUsion example of passing attributes to a CFThread is not valid. In addition, it's not | |
| a Short, Self Contained, Correct Example (SSCCE) that can be tested on TryCF.com or CFFiddle.org since it | |
| requires access to the file system. | |
| https://helpx.adobe.com/coldfusion/developing-applications/developing-cfml-applications/using-coldfusion-threads/using-thread-data.html#TheAttributesscopeandthreadattributes | |
| OFFICAL EXAMPLE: Last updated on Jan 13, 2022 | |
| <cfloop query="dir"> |
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
| <!--- | |
| Comparing ColdFusion CFDocument to WKHTMLTOPDF with GhostScript post-optimization | |
| 2025-04-09 | |
| Requires WKHTMLTOPDF (LGPLv3; portable) https://wkhtmltopdf.org/ | |
| Requires GhostScript (GNU GPL Affero license; portable) https://www.ghostscript.com/ | |
| GIST: https://gist.github.com/JamoCA/b957c34cddea38f4bd2d777b41e348ac | |
| Blog: https://dev.to/gamesover/pdf-generation-bloat-and-optimization-2118 | |
| Tweet: https://x.com/gamesover/status/1910123216972165226 | |
| LinkedIn: https://www.linkedin.com/posts/jamesmoberg_cfml-activity-7315889428340609024-5rEy | |
| Test image from https://www.nasa.gov/image-detail/expedition-73-launch-3/ |
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
| <cfscript> | |
| /** | |
| * generateS3PresignedUrl: Generates a pre-signed Wasabi URL (ColdFusion 2016+ compatible) | |
| * documentation https://docs.wasabi.com/v1/docs/how-do-i-generate-pre-signed-urls-for-temporary-access-with-wasabi | |
| * How to calculate: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html | |
| * @displayname generateS3PresignedUrl | |
| * @author James Moberg http://sunstarmedia.com, @sunstarmedia | |
| * @version 1 | |
| * @lastUpdate 3/20/2025 | |
| * @gist https://gist.github.com/JamoCA/bbdb652e4390898ea27eee489923ede3 |
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
| <cfscript> | |
| // configure awscfml CFC for Wasabi S3 | |
| // https://github.com/jcberquist/aws-cfml | |
| initConfig = { | |
| "awskey": #accessKeyId# | |
| ,"awsSecretKey": #secretAccessKey# | |
| ,"constructorArgs": [ | |
| "s3": [ | |
| "host": "s3.#region#.wasabisys.com" | |
| ] |
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
| <cfscript> | |
| /** | |
| * listGetDuplicates2016: Returns duplicate items in a list. | |
| * Mimics the behavior of ListGetDuplicates from ColdFusion 2025... and adds a couple more options. Compatible with ColdFusion 2016. | |
| * @displayname listGetDuplicates2016 | |
| * @author James Moberg http://sunstarmedia.com, @sunstarmedia | |
| * @version 1 | |
| * @lastUpdate 3/11/2025 | |
| * @gist https://gist.github.com/JamoCA/103625ffdf9688b810485183db9b648f | |
| * @blog https://dev.to/gamesover/backporting-new-coldfusion-2025-function-listgetduplicates-i9n |
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
| /** | |
| * isValidHexString UDF | |
| * Validates if a string is a valid hexadecimal value | |
| * @displayname isValidHexString | |
| * @author James Moberg http://sunstarmedia.com, @sunstarmedia | |
| * @version 1 | |
| * @lastUpdate 3/7/2025 | |
| * @gist https://gist.github.com/JamoCA/c4079d7c813b0ad3d1a28cfc7551c355 | |
| * @blog https://dev.to/gamesover/isvalidhexstring-coldfusion-udf-1cge | |
| * @twitter https://x.com/gamesover/status/1898058042618658843 |
NewerOlder