Instantly share code, notes, and snippets.

View List of self closing ColdFusion Tags
cfabort
cfajaximport
cfajaxproxy
cfapplet
cfapplication
cfargument
cfassociate
cfauthenticate
cfcalendar
cfchartdata
View winSCP.cfm
<!---
<cf_WinSCP action ="listdir"
username =""
password =""
host =""
name ="qryDirectory"
directory ="" />
<cf_WinSCP action="exists"
username =""
View coldfusion cert
keytool -import -storepass [password] -noprompt -alias www.xxxxxxxx.com -keystore C:\ColdFusion8\runtime\jre\lib\security\cacerts -trustcacerts -file C:\ColdFusion8\runtime\jre\lib\security\xxx.cer
View gist:b4c6921021530985d9a2
<cffunction name="testCidrRange" output="false" returntype="boolean">
<cfargument name="CIDR" required="true" type="string">
<cfargument name="TestIP" required="true" type="string">
<cfset var CIDRParts = ListToArray(arguments.CIDR, "/")>
<cfset var CIDRAddress = ListToArray(CIDRParts[1], ".")>
<cfset var CIDRMask = CIDRParts[2]>
<cfset var TestIPAddress = ListToArray(arguments.TestIP, ".")>
<cfset var CIDRRealAddress = 0>
<cfset var CIDRRealMask = 0>
View gist:c7dc42b546c62e3c6110
keytool -import -storepass changeit -noprompt -keystore C:\ColdFusion8\runtime\jre\lib\security\cacerts -trustcacerts -alias isecurus -file C:\inetpub\isecurus.cer
View gist:c30f3d4ab46aa4362062
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<style>
.error {color:red}
</style>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
View spreadsheet.cfm
<cfparam name="attributes.src" default="0">
<cfparam name="attributes.query" default="q">
<cfswitch expression="#thisTag.ExecutionMode#">
<cfcase value="start">
<cfset inputStream = CreateObject("java", "java.io.FileInputStream").init(JavaCast("string", attributes.src )) />
<cfset XSSFWorkbook = CreateObject("java", "org.apache.poi.xssf.usermodel.XSSFWorkbook").init(inputStream) />
<cfset DataFormatter = CreateObject("java", "org.apache.poi.ss.usermodel.DataFormatter") />
<cfset Evaluator = CreateObject("java", "org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator").init(XSSFWorkbook) />
View jquery.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="js/jquery-1.11.2.min.js"></script>
</head>
<body>
View js-cfm.cfm
<!--- 1 ************************************************************************ --->
<cfset DateToday = now() />
<cfdump var = "#DateToday#" />
<script type="text/javascript">
var d = new Date();
console.log( d )
</script>
<!--- 2 ************************************************************************ --->
View UPS.Tracking.cfm
<cfsavecontent variable= "x">
<?xml version="1.0"?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber></AccessLicenseNumber>
<UserId></UserId>
<Password></Password>
</AccessRequest>
<?xml version="1.0"?>
<TrackRequest>
<TrackingNumber>1ZA478X20198248503</TrackingNumber>