View gist:5255391
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 sf = createobject('Java','coldfusion.server.ServiceFactory')> | |
<cfset tasks = sf.CronService.listAll()/> | |
<cfloop from="1" to="#arraylen(tasks)#" index="i"> | |
<cfset here.task = tasks[i]> | |
<cfoutput> | |
<pre> | |
<cfschedule | |
action = "update" | |
task = "#here.task.task#" |
View spreadsheet.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
<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 mail.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
<cfparam name="attributes.type" default="html"> | |
<cfswitch expression="#thisTag.ExecutionMode#"> | |
<cfcase value="start"> | |
</cfcase> | |
<cfdefaultcase> | |
<!--- *************************************************** ---> | |
<!--- Basic Errors ---> | |
<!--- *************************************************** ---> |
View ups.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
<cfcomponent displayname="USP"> | |
<!--- ********************************************************************************************** ---> | |
<!--- Hint: Before start, add correct default values for arguments currently marked with xxxxxxxxxxx ---> | |
<!--- ********************************************************************************************** ---> | |
<cffunction name = "init" access= "Public" output = "No" returntype= "Any"> | |
<!--- UPS Access Settings ---> | |
<cfargument name="License" type="string" required="No" default="xxxxxxxxxxx" hint="UPS License Key" /> | |
<cfargument name="Account" type="string" required="No" default="xxxxxxxxxxx" hint="UPS Account ID" /> |
View winSCP.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
<!--- | |
<cf_WinSCP action ="listdir" | |
username ="" | |
password ="" | |
host ="" | |
name ="qryDirectory" | |
directory ="" /> | |
<cf_WinSCP action="exists" | |
username ="" |
View ColdFusion_MongoDB.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 Mongo = CreateObject("java","com.mongodb.MongoClient")> | |
<cffunction name="m" returntype="any"> | |
<cfargument name="value" type="any"> | |
<cfif IsJSON(arguments.value)> | |
<cfset local.retrun = CreateObject("java","com.mongodb.util.JSON").parse(arguments.value)> | |
<cfelse> | |
<cfset local.retrun = CreateObject("java","com.mongodb.util.JSON").parse( SerializeJSON(arguments.value) )> | |
</cfif> | |
<cfreturn local.retrun> |
View usps_tracking.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
<cfcomponent displayname ="unit" output="no"> | |
<!--- ************************************************************************************ ---> | |
<!--- Get local.tracking ---> | |
<!--- ************************************************************************************ ---> | |
<cffunction name="tracking" access="remote" returntype="any" output="no"> | |
<cfargument name="trackingID" required="yes" type="string"> | |
<cfargument name="UserID" default=""> | |
<cfargument name="Password" default=""> | |
<cfargument name="ShowDetail" default="Yes"> |
View httpGet.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
<cffunction name="httpget" access="private" returnType="any" output="No"> | |
<cfargument name ="source" type="string" required="true"/> | |
<cfargument name ="destination" type="string" required="true"/> | |
<cfargument name ="ConnectTimeout" type="numeric" required="false" default="10" hint="Time Out in Seconds"/> | |
<cfargument name ="ReadTimeout" type="numeric" required="false" default="60" hint="Time Out in Seconds" /> | |
<cfargument name ="dimensions" type="numeric" required="false" default="255"/> | |
<cfset local.urlconnection = createObject("java", "java.net.URL").init(arguments.source)> | |
<cfset local.connection = local.urlconnection.openConnection() /> | |
<cfset local.connection.setConnectTimeout(javaCast("int",arguments.ConnectTimeout*1000)) /> |
View gist:4716338
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
<cffunction name="awsurl" returntype="string" access="public" output="No"> | |
<cfargument name="Query" type="string" required="true" /> | |
<cfargument name="AWSAccessKeyId" type="string" required="true" /> | |
<cfargument name="SecretKey" type="string" required="true" /> | |
<cfargument name="Host" type="string" default="ec2.amazonaws.com" /> | |
<cfargument name="Methord" type="string" default="GET" /> | |
<cfargument name="URI" type="string" default="/" /> | |
<cfargument name="SignatureVersion" type="string" default="2" /> | |
<cfargument name="Version" type="date" default="2012-04-01" /> | |
<cfargument name="http" type="string" default="https" hint="https|http" /> |
NewerOlder