Skip to content

Instantly share code, notes, and snippets.

View davidpanzarella's full-sized avatar

David Panzarella davidpanzarella

View GitHub Profile
@davidpanzarella
davidpanzarella / muraRebuildImageCache.cfm
Created June 13, 2018 23:39 — forked from stevewithington/muraRebuildImageCache.cfm
Mura CMS: Rebuild image cache or re-save images on redefined image sizes
<!--- Force Image Resave for All Images --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID')>
<!--- or to just reset a specific image size you can use --->
<cfset application.serviceFactory.getBean('fileManager').rebuildImageCache(siteid='YOURSITEID' ,size='YOURSIZE')>

DOCKER FIRST (Webinar)

7.1 was designed with a Docker first work flow in mind.

Docker allows increased support for Continuous Deployment and Testing, Multi-Cloud Platforms, Environment Standardization and Version Control. As well as better Isolation and Security (stolen from https://dzone.com/articles/5-key-benefits-docker-ci)

<mura name="Custom Form" contenttypes="*"></mura>
@davidpanzarella
davidpanzarella / SassMeister-input.scss
Created July 25, 2016 21:55
Precise control over responsive typography for Sass
// ----
// libsass (v3.3.2)
// ----
// =========================================================================
//
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS
// ---------------------------------------------------
// Indrek Paas @indrekpaas
//
@davidpanzarella
davidpanzarella / 0_reuse_code.js
Created June 19, 2016 02:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@davidpanzarella
davidpanzarella / nginx.conf
Created March 21, 2016 16:18 — forked from tsucaet/ nginx.conf
Nginx Lucee Mura configuration
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log error;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
// Brightness math based on:
// http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
$red-magic-number: 241;
$green-magic-number: 691;
$blue-magic-number: 68;
$brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number;
@function brightness($color) {
// Extract color components
@davidpanzarella
davidpanzarella / xferrc-en-nl.cfm
Created October 15, 2015 23:03 — forked from JonnyHayes/xferrc-en-nl.cfm
Method to transfer related content from one siteID to another in mura cms.
<cfset siteID = "en">
<cfset remoteSiteID = "nl">
<cfset $ = application.serviceFactory.getBean('$').init(siteID)>
<cfset pluginConfig = $.getBean('pluginManager').getConfig('MuraTranslations')>
<cfset translationManager = createObject("component", "plugins.#pluginConfig.getDirectory()#.cfcs.translationManager").init($.getBean('configBean'), pluginConfig)>
<cfif not structKeyExists(session, "rs")>
<cfquery name="rs">
select distinct contentID, siteID from tcontentrelated where siteID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#siteID#">
</cfquery>
<cfoutput>
<!--- Read out an existing node from the default site.--->
<cfset contentBean=application.contentManager.getActiveContent('59280367-A98E-4F7D-B4463B3E405054FD','default')>
<!--- Pull out a content iterator of the nodes child content (all underlying pages within a given node).--->
<cfset it=contentBean.getKidsIterator(liveOnly='false') />
<!--- The number of Items to be listed is determined by the content.getNextN() value. Its default is 10. --->
<cfset it.setPage(1)>
<!--- You can also set the start row instead of setting a page number. --->
<cfset it.setStartRow(1)>