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
var codes = []; | |
fs.readdirSync(app_root + '/app/models/').forEach(function (file) { | |
var fileModel = app_root + '/app/models/' + file; | |
codes.push({ | |
'file' : fileModel, | |
'text' : fs.readFileSync(fileModel).toString('utf-8') | |
}); | |
}); | |
var scripts = []; |
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
$('article p + div.b-slider-item').each(function(){ | |
$(this).nextAll('div.b-slider-item').andSelf() | |
}) |
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
var overloadMethod = (function () { | |
var functionsByLength = [] | |
function RunOverLoadFunction() { | |
//console.log(arguments.length) | |
if( typeof(functionsByLength[arguments.length]) == 'function' ) | |
functionsByLength[arguments.length]() | |
else { | |
throw new ReferenceError('function is not defined') | |
} |
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 /** | |
* add in node-<nid>.tpl.php | |
* see http://drupalcode.org/project/webform.git/blob/HEAD:/includes/webform.submissions.inc#l610 | |
* output webforms submissions, pager name 'page' | |
*/ | |
if (isset($_GET['page']) && is_numeric($_GET['page'])) { | |
$pager_count = $_GET['page']; | |
} | |
$subms = webform_get_submissions(array('nid' => $node->nid), NULL, $pager_count);?> |
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 | |
if ($modx->context->get('key') == 'mgr') return; | |
if (!function_exists('contextbyurl_error_handler')) { | |
function contextbyurl_error_handler($errno, $errstr) { | |
global $modx; | |
$modx->log(E_ERROR, $errstr); | |
} | |
} | |
$conditions = $modx->getCollection('modContextSetting', array('key' => 'condition.regex')); | |
set_error_handler('contextbyurl_error_handler'); |
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 | |
$tv = $modx->getObject('modTemplateVar', array('name' => $name)); | |
$matchPrams = array(); | |
preg_match('/([^|]+)==' . $input . '/', $tv->get('elements'), $matchPrams); | |
return $matchPrams[1]; |