Skip to content

Instantly share code, notes, and snippets.

JP DeVries jpdevries

Block or report user

Report or block jpdevries

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jpdevries
jpdevries / gist:8902471
Created Feb 9, 2014
Sass to override Redactor font-family
View gist:8902471
/* 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 Apr 8, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<h1>modmore rules!</h1>
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created Apr 28, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="vanity">
<div class="focus">
<h2>Hello World</h2>
</div>
</div>
View gist:cff53d6ff3481661eeca
<?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 Aug 1, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created Aug 1, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created Aug 2, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created Aug 1, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
Edit the Scss to update CSS.
@jpdevries
jpdevries / SassMeister-input-HTML.html
Created Aug 1, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
Edit the Scss to update CSS.
@jpdevries
jpdevries / getHitCount
Last active Aug 29, 2015
get the hit count of a single MODX resource
View getHitCount
<?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]]`]]
You can’t perform that action at this time.