I hereby claim:
- I am sepiariver on github.
- I am sepiariver (https://keybase.io/sepiariver) on keybase.
- I have a public key ASD1X6kMkDJf-qfi4YYBtldsTf2jTVPO46PCj5ur4w6sSQo
To claim this, I am signing this object:
<?php | |
// Only executable via SSH | |
if (PHP_SAPI !== 'cli') exit(); | |
// Instantiate MODX | |
@include(dirname(__FILE__) . '/config.core.php'); | |
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/'); | |
include_once (MODX_CORE_PATH . "model/modx/modx.class.php"); | |
$modx= new modX(); | |
$modx->initialize('web'); |
<?php | |
/* | |
* @author @sepiariver | |
* | |
* GPL license, no warranties, no liability, etc. | |
* | |
* USAGE EXAMPLE: | |
* [[rootResource? &toPlaceholder=`root_resource`]] | |
* //followed by something like |
<?php | |
// Only run this via SSH | |
if (PHP_SAPI !== 'cli') return; | |
// Sometimes helpful if processing lots of Resources | |
ini_set('memory_limit', '2048M'); | |
// Init @modx | |
@include(dirname(__FILE__) . '/config.core.php'); | |
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/'); | |
include_once (MODX_CORE_PATH . "model/modx/modx.class.php"); | |
$modx= new modX(); |
<?php | |
// Only ssh users can execute | |
if (PHP_SAPI !== 'cli') return; | |
// Comes in handy sometimes | |
ini_set('memory_limit', '2048M'); | |
// Instantiate MODX | |
@include(dirname(__FILE__) . '/config.core.php'); | |
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/'); | |
include_once (MODX_CORE_PATH . "model/modx/modx.class.php"); | |
$modx= new modX(); |
<?php | |
/** | |
* Use the cbGetLayoutSetting snippet to get a setting from a particular layout. | |
* @author YJ Tso @sepiariver <yj@modx.com> | |
* @param (id) &resource allows checking for fields on other resources. | |
* @param (bool) &showDebug return debugging info as JSON. | |
* @param (string) &toPlaceholder set a placeholder with this string as key, instead of returning. | |
* @param required (int) &layout - ID of ContentBlocks layout from which to fetch the setting. | |
* @param required (string) &setting - key of layout setting to return. | |
* |
Header set Connection keep-alive | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType image/svg+xml "access 1 month" | |
ExpiresByType text/css "access 1 month" | |
ExpiresByType application/pdf "access 1 month" |
<!-- Open Graph Tags --> | |
<meta property="og:site_name" content="[[++site_name]]" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="[[*longtitle:default=`[[*pagetitle]]`]]" /> | |
<meta property="og:description" content="[[*description:default=`[[++site_description]]`]]" /> | |
<meta property="og:url" content="[[~[[*id]]? &scheme=`full`]]" /> | |
<meta property="og:image" content="[[*image:default=`[[++site_image]]`]]" /> | |
<meta property="fb:app_id" content="[[++fb_app_id]]" /> | |
<meta property="article:publisher" content="[[++fb_url]]" /> | |
<!-- Twitter Tags --> |
<?php | |
$input = $modx->getOption('input', $scriptProperties, '', true); | |
$output = $modx->getOption('options', $scriptProperties, '', true); | |
$classnames = explode(' ', $input); | |
$results = []; | |
foreach ($classnames as $token) { | |
// Strip out any % encoded octets | |
$normalized = preg_replace('|%[a-fA-F0-9][a-fA-F0-9]|', '', $token); | |
// Replace _ with - and lowercase for old times' sake |
.box | |
{ | |
text-align:center; | |
padding:0px; | |
box-shadow:none; | |
} | |
.thing,.box-header,.box-footer,.box-bit | |
{ | |
background:#39f; |
I hereby claim:
To claim this, I am signing this object: