Skip to content

Instantly share code, notes, and snippets.

View desarrolla2's full-sized avatar
💭
Team Manager and Developer | PHP | Symfony.

Daniel González desarrolla2

💭
Team Manager and Developer | PHP | Symfony.
View GitHub Profile
@desarrolla2
desarrolla2 / PRL.js
Last active December 11, 2025 14:02
window.nextClickInterval = setInterval(() => {
const btn = document.querySelector('#next');
if (!btn) {
console.log('[INFO] Button "#next" NOT found.');
return;
}
console.log('[INFO] Button "#next" found.');
@desarrolla2
desarrolla2 / Lorem.php
Created November 18, 2015 09:38
Lorem Ipsum generator for php faker in spanish
<?php
/*
* This file is part of the mitula.products package.
*
* (c) Daniel González <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
/*
* This file is part of the shows on demand package.
*
* (c) Daniel González <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
ini_set('display_errors',0);
register_shutdown_function('shutdown');
$obj = new stdClass();
$obj->method();
function shutdown()
{
if(!is_null($e = error_get_last()))
<?xml version="1.0" encoding="UTF-8" ?>
<doctrine-mapping
xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"
xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Tadium\Component\Promotion\Model\Promotion"
<?php
/**
* This file is part of the lapera.local package.
*
* (c) Daniel González <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LaPera\RestBundle\Controller;
<?php
use FastFeed\Factory;
$fastFeed = Factory::create();
$fastFeed->addFeed('default', 'http://desarrolla2.com/feed');
$items = $fastFeed->fetch('default');
server {
listen 8080;
server_name www.desarrolla2.com blog.desarrolla2.com;
rewrite ^(.*) http://desarrolla2.com$1 permanent;
}
server {
listen 8080;
<?php
namespace Mocks;
use Doctrine\DBAL\Driver\Statement;
/**
* Doctrine DBAL Statement implementing \Iterator.
*
* This class has been created because of a bug in PHPUnit Mock Objects.
@desarrolla2
desarrolla2 / DefaultController.php
Last active December 27, 2015 07:49
performance comparison mysql / doctrine vs ranbbit mq. The aim is to compare which is the performance difference between leaving a message on rabbit, or create a record in mysql. Doctrine and Rabbit are not the same technology, but we want to compare which is the performance difference, to know whether in a particular case, we should introduce r…
<?php
namespace Desarrolla2\Bundle\AnalyticsBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\JsonResponse;
use Desarrolla2\Bundle\AnalyticsBundle\Entity\Data;