Skip to content

Instantly share code, notes, and snippets.

@obxpete
obxpete / cfcomponent.sublime-snippet
Last active July 27, 2017 14:22 — forked from guitrspaz/cfcomponent.sublime-snippet
Creates a blank cfscript component
<snippet>
<content><![CDATA[/**
* @name: ${TM_FILENAME/(.+)\..+|.*/$1/:name}
* @hint: ${1}
* @author: $TM_FULLNAME ($TM_EMAIL)
* @copyright: $TM_ORGANIZATION_NAME
* @created: ${2}
* @modified: ${2}
*/
@obxpete
obxpete / cfAWSSNSexample.cfc
Last active June 11, 2019 21:02
AWS SNS example in ColdFusion
BasicAWSCredentials = createObject("java", 'com.amazonaws.auth.BasicAWSCredentials').init(yourAccessKey, your
secretKey);
// turn credentials into a provider object
AWSCredentialsProviderObj = createObject("java", "com.amazonaws.auth.AWSStaticCredentialsProvider").init(BasicAWSCredentials);
// create our client
AWSSNSClient = createObject("java", "com.amazonaws.services.sns.AmazonSNSClientBuilder").standard().withRegion("us-east-1").withCredentials(AWSCredentialsProviderObj).build();
// create/identify the topicArn, snsMessage and snsSubject text strings of what you want your topic to publish.
@obxpete
obxpete / cfAWSCloudSearchExample.cfc
Last active November 2, 2017 21:23
AWS CloudSearch File/Data upload/update example in ColdFusion
// Create basic AWS credentials properties
BasicAWSCredentials = createObject("java", 'com.amazonaws.auth.BasicAWSCredentials').init(yourAccessKey, YourSecretKey);
// turn credentials into a provider object
AWSCredentialsProviderObj = createObject("java", "com.amazonaws.auth.AWSStaticCredentialsProvider").init(BasicAWSCredentials);
// documents endpoint
serviceEndpoint = 'search-mydomain-myendpointstring.us-east-1.cloudsearch.amazonaws.com';
signingRegion = 'us-east-1';
@obxpete
obxpete / testCloudsearch.json
Last active November 2, 2017 21:17
exaple content for cfAWSCloudSearchExample.cfc gist
[
{"type": "add",
"id": "tt0484562",
"fields": {
"title": "CloudSearch Rocks",
"content": "hello world",
"coid":42,
"minimumUserLevel": 500
}
}
//////////////////////
// 1. crawler config
crawlerConfig = createObject("java", "com.norconex.collector.http.crawler.HttpCrawlerConfig");
// straight test. does the default crawlerconfig have its appropriate methods. ?
//writeDump(crawlerConfig); //YES