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:
| 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" |
| <?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:
| <?php | |
| // The Resource ID to test | |
| $id = (int) $modx->getOption('id', $scriptProperties, $modx->resource->get('id'), true); | |
| // Option to return early if Current Resource matches $id | |
| $matchCurrent = $modx->getOption('matchCurrent', $scriptProperties, true); | |
| // IDs of Resources deemed as "sections", against which to test | |
| $sectionIds = array_filter(array_map('trim', explode(',', $modx->getOption('sectionIds', $scriptProperties, '')))); | |
| // IDs of parent Resources, the direct children of which will be added to $sectionIds | |
| $sectionParentIds = array_filter(array_map('trim', explode(',', $modx->getOption('sectionParentIds', $scriptProperties, '')))); | |
| // If the test passes, meaning the Resource has a $sectionId as an ancestor, output this |
| <?php | |
| $options = (int) $modx->getOption('options', $scriptProperties, 200, true); // 200 words per minute | |
| $wordCount = (int) str_word_count(strip_tags($input)); // To display word count set options to 0 | |
| if ($options === 0) return $wordCount; | |
| return ceil($wordCount / abs($options)); |
| <?php | |
| if ($modx->context->get('key') === 'mgr') return; | |
| $key = $modx->getOption('key', $scriptProperties, 'my-secret-key'); | |
| $val = $modx->getOption('val', $scriptProperties, 'my-secret-value'); | |
| switch ($modx->event->name) { | |
| case 'OnHandleRequest': | |
| if (!$modx->getOption('site_status')) { | |
| if ($_GET[$key] === $val) { | |
| $modx->config['site_status'] = 1; |
| <?php | |
| $options = $modx->getOption('options', $scriptProperties, $modx->getOption('friendly_alias_restrict_chars_pattern'), true); | |
| return $modx->filterPathSegment($input, array('friendly_alias_restrict_chars_pattern' => $options)); |
| <?php | |
| /** | |
| * quickList | |
| * | |
| * Lists Resourcs super fast. Uses code by Garry Nutting of the MODX Core Team. | |
| * | |
| * @author YJ Tso <[email protected]>, Garry Nutting <[email protected]> | |
| * | |
| * | |
| * quickList is free software; you can redistribute it and/or modify it |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |