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
class MVCRoute | |
{ | |
public function getController(); | |
} | |
class MVCDispatcher | |
{ | |
var template = router.match(request).getController(); | |
// render template into view, or pass it to view-package, ... | |
} |
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
// Very simple controller | |
var AboutController = function () { | |
this.dispatch = function (route) { | |
if (route.url == '/about') { | |
return Template['about']; | |
} | |
}; | |
}; | |
// Init Router |
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
Handlebars.registerHelper('currentUserName', function () { | |
var user = Meteor.user(); | |
if (_.isUndefined(user) || _.isNull(user)) { | |
return new Handlebars.SafeString("<i class='icon-spin icon-spinner'></i> Login"); | |
} | |
return user.emails[0].address; | |
}); |
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
#!/usr/bin/env bash | |
cd /home/meteor/xxx | |
export MONGO_URL='mongodb://meteor:xxxx@localhost:27017/xxx-core' | |
export ROOT_URL='http://xxx.xxx.de' | |
export PORT=20000 | |
export MAIL_URL='jenkins:[email protected]:25' | |
function start_app { | |
NODE_ENV=production nohup "node" "/home/meteor/xxx/main.js" 1>>"/home/meteor/xxx/log/xxx.log" 2>&1 & | |
echo $! > "/home/meteor/xxx/bin/innoaccel.pid" |
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
Installing smart packages | |
fs.js:561 | |
return binding.symlink(preprocessSymlinkDestination(destination, type), | |
^ | |
TypeError: dest path must be a string | |
at Object.fs.symlinkSync (fs.js:561:18) | |
at Package.installInto (/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:118:10) | |
at LocalSource.fetch (/usr/local/lib/node_modules/meteorite/lib/sources/local.js:25:3) | |
at Package.fetch (/usr/local/lib/node_modules/meteorite/lib/dependencies/package.js:79:15) |
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
class F | |
{ | |
public $a = false; | |
public $b = false; | |
public function __construct($a) | |
{ | |
$this->a = true; | |
} | |
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
return array( | |
'di' => array( | |
'instance' => array( | |
'alias' => array( | |
'feedaggregator' => 'Fge\Aggregator' | |
), | |
'Fge\Aggregator' => array( | |
'parameters' => array( | |
'feeds' => array( | |
'sdd', |
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 | |
namespace Test; | |
use \Zend\EventManager\EventCollection, | |
\Zend\EventManager\EventManagerAware, | |
\Zend\Di\Locator, | |
\Zend\EventManager\SharedEventCollectionAware, | |
\Zend\EventManager\SharedEventCollection; |
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 | |
class MyController extends Zend_Controller_Action | |
{ | |
private $_modelA; | |
private $_modelB; | |
public function doSomethingAction() | |
{ | |
$this->_modelA->create(); | |
} |
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
class Module | |
{ | |
public function init(Manager $moduleManager) | |
{ | |
$events = $moduleManager->events(); | |
$sharedEvents = $events->getSharedCollections(); | |
$sharedEvents->attach('Zend\Mvc\Bootstrap', 'bootstrap', array($this, 'test'), 900); | |
} | |
public function test($e) |