This file contains hidden or 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 Sergiors\LinkedList; | |
class LinkedList | |
{ | |
private $firstNode; | |
private $lastNode; |
This file contains hidden or 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 Inbep\Inbep\Console\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Sergiors\Worker\Command\CommandInterface; | |
use Sergiors\Worker\Command\Invoker; | |
class DaemoniseCommand extends Command |
This file contains hidden or 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 Inbep\Component\Doctrine\DBAL\Platforms\Keywords; | |
use Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords; | |
/** | |
* @author Sérgio Rafael Siqueira <[email protected]> | |
*/ | |
class PostgreSQL92ContribKeywords extends PostgreSQL92Keywords | |
{ |
This file contains hidden or 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 Inbep\Twig\Extension; | |
/** | |
* @author Sérgio Rafael Siqueira <[email protected]> | |
*/ | |
class MaskExtension extends \Twig_Extension | |
{ | |
private $masks = [ | |
'phone' => [ |
This file contains hidden or 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 Inbep\Doctrine\Query\PostgreSql; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\Parser; | |
use Doctrine\ORM\Query\SqlWalker; | |
class JsonbHashGreaterGreater extends FunctionNode | |
{ |
This file contains hidden or 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
// see before https://github.com/sergiors/vanilla | |
(function() { | |
'use strict'; | |
var state = document.getElementById('address_state'); | |
state.on('change', function() { | |
var city = document.getElementById('address_city'); | |
city.setAttribute('disabled', true); |
This file contains hidden or 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
define(function(require) { | |
'use strict'; | |
var React = require('react'); | |
var dom = React.DOM; | |
return React.createClass({ | |
propTypes: { | |
onClose: React.PropTypes.func.isRequired | |
}, |
This file contains hidden or 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
// before | |
var fib = function(n) { | |
if (n <= 1) { | |
return n; | |
} | |
else { | |
return fib(n - 1) + fib(n - 1); | |
} | |
}; |
This file contains hidden or 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
_.each(['Model', 'Collection'], function(name) { | |
var ctor = Backbone[name]; | |
var fetch = ctor.prototype.fetch; | |
ctor.prototype.fetch = function() { | |
this.trigger('fetch', this); | |
return fetch.apply(this, arguments); | |
} | |
}); |
This file contains hidden or 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 User = (function() { | |
'use strict'; | |
var user = {}; | |
function User(attrs) { | |
user.profile = attrs.profile || {}; | |
user.address = attrs.address || {}; | |
user.payments = attrs.payments || {}; | |
} |