Skip to content

Instantly share code, notes, and snippets.

View davidpanzarella's full-sized avatar

David Panzarella davidpanzarella

View GitHub Profile
@mikaelbr
mikaelbr / destructuring.js
Last active February 20, 2025 13:00
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@stevewithington
stevewithington / muraCleanFiles.cfm
Created March 31, 2014 16:53
Mura CMS : remove any truly orphaned files from Mura CMS.
<cfset application.serviceFactory.getBean('fileManager').cleanFileCache('[siteid]') />
@stevewithington
stevewithington / config.xml.cfm
Last active December 14, 2023 10:10
Mura CMS : Example of how to create a Frequently Asked Questions (FAQ) area/section with Mura CMS and Bootstrap3 markup.
<!--
1) Drop this in your theme /{SiteID}/includes/themes/{Theme}/config.xml.cfm
-->
<theme>
<extensions>
<extension type="Folder" subType="FAQ" availableSubTypes="Page/Question" iconClass="icon-question-sign">
</extension>
<extension type="Page" subType="Question" iconClass="icon-question" hasSummary="0" hasBody="0" hasAssocFile="0">
</extension>
@guilherme
guilherme / gist:9604324
Last active October 10, 2024 18:27
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@stevewithington
stevewithington / muraGetChildrenFeed.cfm
Last active December 2, 2020 17:18
Mura CMS : This example demonstrates how to obtain a content feed based on the contentid, type, and/or subtype.
<cfscript>
public any function getChildrenFeedByContentID(
required contentid
, string type=''
, string subtype=''
) {
var local = {};
local.feed = $.getBean('feed');
local.feed.setMaxItems(0);
@dannycjones
dannycjones / detailed-breadcrumb-mod.css
Last active August 29, 2015 13:56
Shorten's breadcrumb to only show current & parent page when on mobile & tablet.
/* Shorten Breadcrumbs on Tablet and Smartphones */
/* Coded by Dan Jones */
@media only screen and (max-width: 1024px) {
ul.sm-breadcrumb > li.sm-breadcrumb-item {
display:none;
}
ul.sm-breadcrumb li:nth-child(1), ul.sm-breadcrumb li:nth-child(2), ul.sm-breadcrumb li:nth-last-child(1), ul.sm-breadcrumb li:nth-last-child(2), ul.sm-breadcrumb li:nth-last-child(3), ul.sm-breadcrumb li:nth-last-child(4) {
display:inline-block;
@modmedia
modmedia / mura-amazon-s3-variables.cfm
Created January 25, 2014 02:19
Config variables for connecting Mura CMS to Amazons3
<!--- add/edit these in your settings.ini.cfm --->
filestore=s3
filestoreaccessinfo=access Key ID^secret Access Key^bucket-name
filedir=s3://myAccessKey:[email protected]/bucket-name/folder
assetpath=http://s3.amazonaws.com/bucket-name/folder
@evanscottgray
evanscottgray / docker_kill.sh
Last active November 7, 2023 03:40
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active April 28, 2025 21:34
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@modmedia
modmedia / isotopeCSS.cfm
Last active January 2, 2016 15:19
Create an isotope gallery with Mura Categories as filters
<!--- if using CFStatic --->
<cf_CacheOMatic key="isotopeCSS">
#$.static()
.include('/css/isotope/')
.renderIncludes('css')#
</cf_CacheOMatic>
<!--- Static CSS Include --->
<!--- <link rel="stylesheet" href="#$.siteConfig('themeAssetPath')#/css/isotope/isotope.css"> --->