Skip to content

Instantly share code, notes, and snippets.

View baldurrensch's full-sized avatar

Baldur Rensch baldurrensch

  • Sourceability LLC
  • Irvine, CA
View GitHub Profile
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
@baldurrensch
baldurrensch / log
Created July 8, 2014 01:12
Opsworks Log file
Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache/cookbooks/opsworks_commons/libraries/shellout.rb:8:in `shellout'
/var/lib/aws/opsworks/cache/cookbooks/opsworks_berkshelf/providers/runner.rb:13:in `block (3 levels) in class_from_file'
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache/cookbooks/opsworks_berkshelf/providers/runner.rb
<?php
namespace Acme\OAuthServerBundle\EventListener;
use FOS\UserBundle\Model\UserManagerInterface;
use FR3D\LdapBundle\Ldap\LdapManagerInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
class UpdateUserWithLdapListener
@baldurrensch
baldurrensch / setup_new_bundle.sh
Created January 31, 2014 19:47
Shell script that copies some basic files into a newly extracted/created bundle
cp ../Common/composer.json .
mkdir -p Tests/
cp ../Common/Tests/bootstrap.php Tests/
cp ../Common/.gitignore .
cp ../Common/phpunit.xml.dist .
cp ../Common/.travis.yml .
@baldurrensch
baldurrensch / delete_merged_branches.sh
Created December 6, 2013 19:27
Delete merged branches
# github is the name of my remote
git branch --merged | grep -v "\*" | xargs -n 1 git push --delete github
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
<?php
$elements->filter(
function($elem) use ($target) {
return $elem->getId() == $target;
}
);
> Running command "phpunit --coverage-clover '/tmp/php-code-coverageMkj99j'"...
>
>
>
> [Symfony\Component\Process\Exception\ProcessFailedException]
> The command "phpunit --coverage-clover '/tmp/php-code-coverageMkj99j'" failed.
>
> Output:
> ================
> PHPUnit 3.7.22 by Sebastian Bergmann.
$router = $this->get('router');
$route = $router->match("/api/search/test");
print_r($route);
@baldurrensch
baldurrensch / XHGuiTestListener.php
Last active December 14, 2015 12:09
This test listener insert profiling information for every unit test run.
<?php
namespace BR\PHPUnitTestListeners;
use PHPUnit_Framework_TestListener;
use PHPUnit_Framework_Test;
use PHPUnit_Framework_TestSuite;
use PHPUnit_Framework_AssertionFailedError;
use Exception;
<?php
namespace Ibms\AppBundle\Form\EventListener;
use Doctrine\ORM\QueryBuilder;
use Ibms\SupplierBundle\Entity\Supplier;
use Ibms\SupplierBundle\Entity\SupplierManager;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormFactoryInterface;