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
| <cfscript> | |
| random = createObject("java", "java.security.SecureRandom"); | |
| salt_bytes = javaCast("byte[]", [].set(1,50,0)); | |
| iterations = 10000; | |
| key_length = 2048; | |
| password = javaCast("char[]", ['p','a','s','s','w','o','r','d']); | |
| random.nextBytes(salt_bytes); | |
| cryptoSpec = createObject("java", "javax.crypto.spec.PBEKeySpec").init(password, salt_bytes, iterations, key_length); | |
| skf = createObject("java", "javax.crypto.SecretKeyFactory"); | |
| keyFactory = skf.getInstance('PBKDF2WithHmacSHA1'); |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Context docBase="[docBase]"> | |
| </Context> |
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
| <Host name="[virtual host name]" appBase="[appBase]"> | |
| <Context path="" docBase="[docBase]" /> | |
| </Host> |
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
| <cfscript> | |
| // If you don't set this then the searchParams structure will be uppercased when converted to JSON and cause ElasticSearch to error. | |
| processingdirective preserveCase="true"; | |
| public struct function elasticSearchSearch( required string serverURL, | |
| required struct searchParams, | |
| required string index, | |
| required string type) { | |
| // Post the search parameters to the ElasticSearch index and type | |
| http method="post" url="#arguments.serverURL#/#arguments.index#/#arguments.type#/_search" result="searchResponse" { |
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
| <cfscript> | |
| // Query to retrieve some data from the database | |
| variables.myData = queryExecute( | |
| sql = " | |
| SELECT * | |
| FROM myTable | |
| LIMIT 10 | |
| ", | |
| options = {datasource="#Application.myDSN#"} | |
| ); |
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
| // Include require nodejs modules | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var concat = require('gulp-concat'); | |
| var less = require('gulp-less'); | |
| var compressor = require('gulp-compressor'); | |
| // Define paths | |
| var paths = { | |
| lessFile: 'includes/css/styles.less', |
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
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var less = require('gulp-less'); | |
| var paths = { | |
| lessFile: 'includes/css/styles.less', | |
| lessFiles: 'includes/css/*.less', | |
| cssDir: 'includes/css' | |
| }; |
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
| <cfparam name="URL.searchTerm" default=""> | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>This is my example..</title> | |
| </head> | |
| <body> | |
| <form action="example.cfm" method="GET"> | |
| <label for="searchTerm">Search: </label> |
NewerOlder