This file contains 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
<table> | |
<thead> | |
<tr> | |
<th>Setting</th> | |
<th>Value</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>Setting A</td> |
This file contains 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
<?php | |
/** | |
* | |
* Plugin fires OnWebPagePrerender system event, loads Minify HTML by Mr Clay and minifies the requested Resource HTML inc. inline css and js. | |
* | |
* If used in conjunction with StatCache the minified HTML is cached and served as a flat file via IIS Rewrite. | |
* | |
* CREDITS | |
* | |
* http://rtfm.modx.com/revolution/2.x/developing-in-modx/basic-development/plugins |
This file contains 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
module.exports = function(grunt) { | |
// Project configuration. | |
var initConfig = { | |
pkg: grunt.file.readJSON('package.json'), | |
dirs: { /* just defining some properties */ | |
lib: './lib/', | |
theme: '../', | |
assets: 'assets/', | |
img: 'img/' |
This file contains 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
%greedy { | |
width:100%; | |
} | |
div { | |
// we can do this |
This file contains 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
%greedy { | |
width:100%; | |
} | |
div { | |
// wish we could do this |
This file contains 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
function distanceBetweenTwoPoints(_a,_b) { | |
return Math.sqrt(Math.pow(Math.abs(_a.y - _b.y),2) + Math.pow(Math.abs(_a.x - _b.x),2)) | |
} |
This file contains 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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { // Task | |
dist: { // Target | |
files: { // Dictionary of files | |
'style.css': 'style.scss' // 'destination': 'source' | |
} | |
}, |
This file contains 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
<?php | |
switch ($modx->event->name) { | |
case 'OnDocFormPrerender': | |
if(!$resource) return; | |
$key = 'redactor.image_upload_path'; | |
$userId = $modx->user->get('id'); | |
$usersetting = $modx->getObject('modUserSetting', array('key' => $key, 'user' => $userId)); | |
if(!$usersetting) return; | |
This file contains 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
<?php | |
$tstart = microtime(true); | |
set_time_limit(0); | |
require 'config.core.php'; // absolute path to your MODX config | |
require MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = modX::getInstance(); | |
$modx->initialize('mgr'); |
This file contains 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
UPDATE modx_site_content SET content = replace(content, 'src="assets', 'src="/assets'); |