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
DECLARE @sqlForeignKeys VARCHAR(MAX) | |
SELECT @sqlForeignKeys = ISNULL(@sqlForeignKeys,'') + | |
'ALTER TABLE dbo.[' + OBJECT_NAME(FK.parent_object_id) + '] DROP CONSTRAINT [' + FK.name + '];' + CHAR(10) | |
FROM SYS.FOREIGN_KEYS FK | |
//PRINT(@sqlForeignKeys) | |
EXEC(@sqlForeignKeys) | |
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
local.rsSites = arguments.$.getBean('settingsManager').getList(); // all sites | |
local.rsPlugin = arguments.$.getBean('pluginManager').getPlugin( variables.framework.package ); // plugin record | |
local.pluginAssignments = arguments.$.getBean('pluginManager').getAssignedSites( local.rsPlugin.moduleID ); // recordset of sites this plugin belongs to | |
local.pluginXML = arguments.$.getBean('pluginManager').getPluginXML( local.rsPlugin.moduleID ); | |
// loop assigned sites and make sure they are setup per the plugin requirements | |
for (site in local.pluginAssignments) { | |
// make sure all class (defined in plugin/config.xml.cfm) extentions exist | |
application.configBean.getClassExtensionManager().loadConfigXML( local.pluginXML, site.siteID ); |
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
# Delete the possibly existing autocomplete test index | |
curl -X DELETE localhost:9200/autocomplete_test | |
# Put the config of the autocomplete index | |
curl -X PUT localhost:9200/autocomplete_test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { | |
"analyzer" : { |
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> | |
param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv'; | |
param name='form.group' default='Temp'; | |
param name='form.isSubmitted' default='false'; | |
param name='form.isTest' default='true'; | |
param name='form.siteid' default='default'; | |
$ = application.serviceFactory.getBean('$').init(form.siteid); | |
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) { |
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
component extends='mura.cfobject' { | |
// drop this in your site or theme eventHandler.cfc | |
public any function onRenderStart($) { | |
// allow for a 'View As PDF' link (e.g., <a href="./?viewAsPDF=1">View As PDF</a>) | |
if ( IsBoolean(arguments.$.event('viewAsPDF')) && arguments.$.event('viewAsPDF') ) { | |
arguments.$.content('template', 'pdf.cfm'); | |
} | |
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
<!--- | |
1) Drop this file under /config/ directory. | |
2) Add errortemplate=/muraWRM/config/customErrorFile.cfm to the settings.ini.cfm file. | |
3) Set debuggingenabled=false in the settings.ini.cfm file. | |
4) Reload Mura CMS | |
---> | |
<cftry> | |
<cfset msg = 'MURA ERROR - MESSAGE: #arguments.exception.Message# DETAIL: #arguments.exception.Detail# ' /> | |
<cflog type="ERROR" file="MuraError" text="#msg#" /> | |
<cfcatch></cfcatch> |
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
I recently had to install MySQL 5.6 on Ubuntu 12.04 from a .deb package on the MySQL website. It seems that either the package has been updated recently or nobody uses this method to install so I ended up running into endless problems. Through trial and error I found the following method works for me. | |
Install libaio-dev: | |
sudo apt-get install libaio-dev | |
Now install your package(mine was enterprise edition, community may have a different filename): | |
sudo dpkg -i mysql-advanced-5.6.10-debian6.0-x86_64.deb | |
This will install your files to the /opt directory, instead of the more common /etc directory. No worries, all we need to do is point our system at this new directory. |
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> | |
// Grab local content index (feed) by name. I believe siteid is optional, but I have always included it. | |
var feed = application.feedManager.readByName('Banners', $.event("siteid")); | |
// Create a content iterator from the feed. | |
var banners = feed.getIterator(); | |
// HTML to add to. | |
var html = ""; |