Skip to content

Instantly share code, notes, and snippets.

@jpdevries
jpdevries / gist:8902471
Created February 9, 2014 17:24
Sass to override Redactor font-family
/* this will override the redactor font-family declaration regarldess order */
body { /* add specificity */
.redactor-link-tooltip,
.redactor-link-tooltip a {
font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; /* your other font here */
}
}
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created April 8, 2014 17:10
Generated by SassMeister.com.
<h1>modmore rules!</h1>
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created April 28, 2014 00:15
Generated by SassMeister.com.
<div class="vanity">
<div class="focus">
<h2>Hello World</h2>
</div>
</div>
@jpdevries
jpdevries / gist:cff53d6ff3481661eeca
Last active August 29, 2015 14:04
redactor patch
<?php
// patches https://github.com/modxcms/revolution/issues/11291 for Redactor 1.4.3 and MODX 2.2.15 - 2.3.1
$this->patch_11291 =
(bool)((bool)$this->modx->getOption('redactor.patch_11291', null, false)
&& version_compare('2.2.15-pl',$vd['full_version'],'<=')
&& version_compare('2.3.1-pl',$vd['full_version'],'>='))
;
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created August 1, 2014 02:47
Generated by SassMeister.com.
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created August 1, 2014 03:17
Generated by SassMeister.com.
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created August 1, 2014 19:32
Generated by SassMeister.com.
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created August 1, 2014 19:39
Generated by SassMeister.com.
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created August 2, 2014 04:37
Generated by SassMeister.com.
Edit the Scss to update CSS.
@jpdevries
jpdevries / getHitCount
Last active August 29, 2015 14:05
get the hit count of a single MODX resource
<?php
$defaultHitsCorePath = $modx->getOption('core_path').'components/hits/';
$hitsCorePath = $modx->getOption('hits.core_path',null,$defaultHitsCorePath);
$hitService = $modx->getService('hits','Hits',$hitsCorePath.'model/hits/',$scriptProperties);
if (!($hitService instanceof Hits)) return 'failed';
$s= '';
// pass this into your snippet [[!getHitCount? &resource=`[[**id]]`]]