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
| <!--- created by Charlie Arehart, as offered at https://gist.github.com/carehart ---> | |
| Following are the various ColdFusion system environment variables defined in this CF instance, | |
| which are typically set in the CF startup "java.args" in the CF Admin or jvm.config.<p> | |
| The focus here is on those which would be set that way as starting with "-DColdFusion.", which | |
| some CF updates offer. They're offered here in alpha order.<p> | |
| This code can be useful to confirm if ones you THINK are set HAVE been set (or vice-versa).<p> | |
| (An * precedes those typically preconfigured by CF to exist, setting system paths, etc. But note that some recent CF updates or installers may preconfigure new settings by default as well.)<p> |
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
| This gist contains several files which demonstrate cflock (for Adobe ColdFusion and Lucee). | |
| They're examples I showed in my talk on the topic at https://www.carehart.org/presentations/#cflock . | |
| You could save all the files in a single folder. | |
| Note that there's an Application.cfc (and cfm and OnRequestEnd, for those preferring that). | |
| Otherwise, the files are numbered in the order presented in my talk, and are generally self-explanatory. |
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
| <!-- for more, see my Aug 15 2024 comment in my post at https://coldfusion.adobe.com/2019/04/get-cf-know-users-real-ip-address-behind-proxy-load-balancer-caching-solution-etc/#comment-48778 --> | |
| <Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="CF-Connecting-IP" | |
| trustedProxies=" | |
| ^(173\.245\.(?:4[8-9]|5[0-9]|6[0-3])\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(103\.21\.(?:2(?:4[4-7]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(103\.22\.(?:2(?:0[0-3]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(103\.31\.(?:[4-7])\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(141\.101\.(?:6[4-9]|[7-9][0-9]|1(?:[0-1][0-9]|2[0-7]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(108\.162\.(?:1(?:9[2-9])|2(?:[0-4][0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(190\.93\.(?:2(?:4[0-9]|5[0-5]))\.(?:[0-9]|[1-9][0-9]|1(?:[0-9][0-9])|2(?:[0-4][0-9]|5[0-5])))$|^(18 |
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
| -- Who is running what at this instant | |
| SELECT dest.text AS [Command text] , | |
| der.total_elapsed_time as 'total_elapsed_time (ms)', | |
| DB_NAME(der.database_id) AS DatabaseName , | |
| der.command , des.login_time , des.[host_name] , des.[program_name] , der.session_id | |
| FROM sys.dm_exec_requests der | |
| INNER JOIN sys.dm_exec_connections dec | |
| ON der.session_id = dec.session_id | |
| INNER JOIN sys.dm_exec_sessions des | |
| ON des.session_id = der.session_id |