Skip to content

Instantly share code, notes, and snippets.

///////////////////////////////////////////////////////////////////////
// layout.php
<?php $env = sfApplicationConfiguration::getActive()->getEnvironment() ?>
<?php if($env == 'prod'): ?>
<script type="text/javascript">
console.log('Estamos en producción');
</script>
<script src="/dist/js/all.min.js" type="text/javascript"></script>
<?php else: ?>
@eemece2
eemece2 / disallow-new.js
Created January 26, 2017 20:53 — forked from mattdesl/disallow-new.js
avoiding new in classes
// Allows:
// funkyParser()
module.exports = function createFunkyParser(opt) {
return new FunkyParser(opt)
}
function FunkyParser(opt) {
// make params optional
opt = opt || {}