View rerelaceNoCaseExample.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
<cfsetting showdebugoutput="false"> | |
<!--- Here is some html content with iframes ---> | |
<cfset sOriginalContent = " | |
<h3>Title Here</h3> | |
<pHere is a paragraph</p> | |
<iframe width=""560"" height=""315"" src=""//www.youtube.com/embed/B7UmUX68KtE"" frameborder=""0"" allowfullscreen></iframe> | |
<p>another paragraph</p> |
View contentRenderer.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
<cffunction name="getFeedByRestrictGroups" output="false"> | |
<cfargument name="restrictGroups" required="true"> | |
<cfargument name="maxItems" default="20"> | |
<!--- Get the feed object by name ---> | |
<cfset var feed = $.getBean("feed")> | |
<cfset var item = ""> | |
<cfset feed | |
.setSortBy("OrderNo") |
View download_csv.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 csv = io.queryToCSV(query=qMyQuery,fields="field1,field2,field3,...")> | |
<cfheader name="Content-disposition" value="attachment;filename=MyCSVFile.csv"> | |
<cfcontent type="text/csv"> | |
<cfoutput>#csv#</cfoutput> |
View snake_to_camel.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="form.snake_case" default=""> | |
<cfparam name="form.camel_case" default=""> | |
<cfparam name="form.upper_camel_case" default=""> | |
<cfscript> | |
if (len(form.snake_case)) { | |
form.camel_case = REReplace(form.snake_case, "_([a-zA-Z])", "\u\1", "all"); | |
form.upper_camel_case = REReplace(form.camel_case, "\b([a-zA-Z]+)", "\u\1", "all"); | |
} |
View Coldbox.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
void function afterConfigurationLoad(event,interceptData,buffer){ | |
//writeDump(controller.getConfigSettings()) | |
var basePath = getDirectoryFromPath(getCurrentTemplatePath()); | |
/* Check for custom configuration file. This should be ignrored */ | |
if (fileExists("#basePath#/CustomConfig.json.cfm")) { | |
var settingsJSON = fileRead("#basePath#/CustomConfig.json.cfm"); |
View datepicker-today.js
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
$.datepicker._gotoToday = function(id) { | |
var target = $(id); | |
var inst = this._getInst(target[0]); | |
var date = new Date(); | |
this._setDate(inst,date); | |
this._hideDatepicker(); | |
} | |
View MyHandler.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
component extends="coldbox.system.EventHandler" { | |
function myEvent(event,rc,prc,widget=false) { | |
prc.message = "Test from Coldbox event"; | |
if (arguments.widget) { | |
return renderView("main/myView"); | |
} | |
event.setView("main/myView"); |
View MultiRecordSetQuery.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
component output="false" singleton="true" { | |
/** | |
* | |
* Constructor | |
* | |
*/ | |
public any function init() { | |
var serviceFactory = createObject("java", "coldfusion.server.ServiceFactory"); |
View Mura7_setup.boxr
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
# Need latest CommandBox 3.6 | |
# install cfconfig | |
install commandbox-cfconfig --force | |
# install mura 7 | |
install muracms | |
# start server | |
server start cfengine=lucee@5 rewritesEnable=true openBrowser=false | |
# setup datasource |
View Mura6.2_setup.boxr
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
# Need latest CommandBox 3.6 | |
# install cfconfig | |
install commandbox-cfconfig | |
# install Mura 6.2 | |
install id=https://github.com/blueriver/MuraCMS/archive/6.2.zip | |
# install git+https://github.com/blueriver/MuraCMS.git#6.2 | |
# Move contents to root folder since they get installed in MuraCMS directory |
OlderNewer