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
<!--- create a user object, modify 'myemail' and 'mypassword' ---> | |
<cfset userObj = CreateObject('component','core.beans.User').init( | |
userId = 0, | |
username = 'myemail', | |
password = LCase(Hash('mypassword','SHA-384')), | |
role = 'admin', | |
isActive = 1 | |
) /> | |
<!--- save the user object ---> |
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
var exec = require('child_process').exec, | |
child; | |
child = exec('echo %username%', | |
function (error, stdout, stderr) { | |
console.log('username: ' + stdout); | |
}); |
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 myPlainText = "This is a block of text we will encrypt" /> | |
<cfset myKey = "VpugAocKZVP8BZfamx96Yw==" /> | |
<cfset myCipherText = Encrypt(myPlainText,myKey,'AES/CBC/PKCS5Padding','HEX') /> | |
<cfoutput>#myCipherText#</cfoutput> | |
<cfscript> | |
myPlainText = "This is a block of text we will encrypt"; | |
myKey = "VpugAocKZVP8BZfamx96Yw=="; | |
myCipherText = Encrypt(myPlainText,myKey,'AES/CBC/PKCS5Padding','HEX'); | |
writeOutput( myCipherText ); |
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
function didGodDoIt( object, person ) { | |
if( person.hasOwnProperty( religious ) ) { | |
return true; | |
} | |
if( object.hasOwnProperty( scientificExplanation ) ) { | |
return false; |
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
<cfscript> | |
myString = 'dog'; | |
myKey = 'ITRkCTb/XMtGT0g99WUkKak/hhNvPml3k+UbsVDqSBE='; | |
myAlgorithm = 'AES/CBC/PKCS5Padding'; | |
myEncoding = 'HEX'; | |
encString = encrypt( myString, myKey, myAlgorithm, myEncoding ); | |
writeOutput( encString ); | |
</cfscript> |