Skip to content

Instantly share code, notes, and snippets.

View mridgway's full-sized avatar

Michael Ridgway mridgway

View GitHub Profile
var async = require('async');
mysqlConnection.query(queryString, function selectCb(error, results, fields) {
var subQueryFns = [];
for (i=0; results.length; i++) {
subQueryFns.push(function (cb) {
mysqlConnection.query(deeperQueryString, function selectCb (error, results, fields) {
cb(error, results);
}
});
}
YUI.add('mojito-mu', function(Y, NAME) {
Y.mojito.addons.viewEngines.mu = Y.mojito.addons.viewEngines.hb;
}, '0.1.0', {requires: [
'mojito-hb'
]});
@mridgway
mridgway / gist:2785983
Created May 25, 2012 05:37
mojito test failures
FAILURE DETAILS:
================
mojito-intl-addon-tests :: intl tests :: formatDate() delegates to Y.DataType.Date.format
TypeError: Cannot read property 'Date' of undefined
at [object Object].formatDate() delegates to Y.DataType.Date.format (/Users/mike/Projects/mojito/source/lib/tests/autoload/app/addons/ac/intl-tests.common.js:95:43)
at [object Object]._resumeTest (/Users/mike/Projects/mojito/source/node_modules/yuitest/lib/yuitest-node.js:3117:29)
at [object Object]._runTest (/Users/mike/Projects/mojito/source/node_modules/yuitest/lib/yuitest-node.js:3325:26)
at [object Object]._run (/Users/mike/Projects/mojito/source/node_modules/yuitest/lib/yuitest-node.js:3073:30)
at Timer._callback (/Users/mike/Projects/mojito/source/node_modules/yuitest/lib/yuitest-node.js:3238:44)
at Timer.<anonymous> (timers.js:172:14)
<?php
interface ArrayTransformer
{
/**
* @abstract
* @param object $object
* @return array
*/
public function toArray($object);
<?php
// $em is d2 entity manager
//
$class = array(
'Blog\Model\Article',
'User\Model\User'
);
$tool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
<?php
$em = $this->_em = \Zend_Registry::getInstance()->get('doctrine');
$this->_tool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
$this->_classes = array (
$em->getClassMetadata('Core\Model\Module'),
$em->getClassMetadata('Core\Model\Module\Block'),
$em->getClassMetadata('Core\Model\Module\Content'),
$em->getClassMetadata('Core\Model\AbstractPage'),
<?php
class ExceptionTest extends Exception {}
$data;
try {
if (true) {
try {
throw new ExceptionTest();
} catch (ExceptionTest $e) {