Skip to content

Instantly share code, notes, and snippets.

View trycf-gist-1708719948452-31683596-ee83-b003-5013-24e37d3064e9.cfm
<cfscript>
a = "Trusty";
if ( arrayFindNoCase( ['Trust','LLC/Corp' ], a ) ) {
writeOutput("Yep");
} else {
writeOutput("Nope");
}
View trycf-gist-1708719948452-31683596-ee83-b003-5013-24e37d3064e9.cfm
<cfscript>
a = "123 Main Street";
writeOutput("#a#<br>");
propertyStreetNumber = a.listFirst( ' ' );
propertyStreetName = a.replace( propertyStreetNumber, '' ).trim();
View trycf-gist-1708714853439-8524ddf6-7262-5150-f148-b56dc115f1be.cfm
<cfset local.analysis_months = 2>
<cfset local.analysis_years = 2>
<cfset local.current_list = "">
<cfset local.analysis_date = now()>
<!--- Now we have our analysis date, we can build our month range for this year and the historical years. --->
<cfset local.current_list = "">
<!--- Reduce the month range because we will be using it in a zero based loop. --->
<cfset local.analysis_months-->
View trycf-gist-1708714030710-f80e09f6-cdcc-8aeb-0087-28b39a61e7d2.cfm
<cfscript>
errors = queryNew(
'etime',
'date',
[
[createDate( 2023, 1, 1 )],
[createDate( 2024, 1, 1 )],
[createDate( 2025, 1, 1 )]
]);
View trycf-gist-1708694925646-f6995565-b4f4-88bd-fd03-a23d8ada073e.cfm
<cfset beginDtList =''>
<cfset beginDtList = ListAppend(beginDtList,"02/23/2024")>
<cfset beginDtList = ListAppend(beginDtList,"02/25/2024")>
<cfdump var="#beginDtList#" />
<cfdump var="#ListSort(beginDtList,'numeric','ASC')#" />
View trycf-gist-1708680085288-e7fbef2f-c9d9-3dff-917c-7c2c9a294828.cfm
<cfhttp method="GET" url="https://cloud10.todocoleccion.online/cromos-futbol/tc/2024/02/03/11/460270167.jpg">
<cfset file = cfhttp.filecontent>
<cfscript>
image_url = 'https://cloud10.todocoleccion.online/cromos-futbol/tc/2024/02/03/11/460270167.jpg';
imgObj = imageNew(image_url);
//writeoutput(ToBase64(ToBinary(imgObj),"utf-8"));
//writeoutput(ToBinary(imgObj));
//writeoutput(ToBase64("esto es una prueba"));
View trycf-gist-1708680085288-e7fbef2f-c9d9-3dff-917c-7c2c9a294828.cfm
<cfhttp method="GET" url="https://cloud10.todocoleccion.online/cromos-futbol/tc/2024/02/03/11/460270167.jpg">
<cfset FILE = cfhttp.filecontent>
<cfscript>
image_url = 'https://cloud10.todocoleccion.online/cromos-futbol/tc/2024/02/03/11/460270167.jpg';
imgObj = imageNew(image_url);
//writeoutput(ToBase64(ToBinary(imgObj),"utf-8"));
//writeoutput(ToBinary(imgObj));
//writeoutput(ToBase64("esto es una prueba"));
View trycf-gist-1708673150355-cc90bc6b-a0b2-e120-b361-db9ec9366ac8.cfm
<cfscript>
function bitAndCustom(num1, num2) {
// Convert the input BigIntegers to Java BigInteger objects
var javaNum1 = createObject("java", "java.math.BigInteger").init(num1);
var javaNum2 = createObject("java", "java.math.BigInteger").init(num2);
// Perform the bitwise AND operation
var result = javaNum1.and(javaNum2);
// Convert the result back to a ColdFusion integer
var op = 2147483648;
var op1 = op.intValue()
View trycf-gist-1708626504133-88838cf2-46f5-b7cf-772d-5910bc5ccd03.cfm
<cfset text = {
"iss" = "a",
"sub" = "b",
"abcd" = "efgh",
"aud" = "adobe",
"exp" = "#DateAdd("n", 30, now())#",
"id"="cc",
"iat"="#DateAdd("n", -30, now())#"
}>