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
#!/usr/bin/env bash | |
ANSIBLE_PLAYBOOK=$1 | |
ANSIBLE_HOSTS=$2 | |
INVENTORY_FILE="/tmp/ansible_hosts" | |
function check_arguments() { | |
if [ -z ${ANSIBLE_PLAYBOOK} ]; then | |
echo "Usage: ansible-playbook-helper playbook-file [inventory-file|hostname]" | |
exit 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
<?php | |
namespace Application; | |
use Zend\Mvc\MvcEvent; | |
use Zend\Validator\AbstractValidator; | |
class Module | |
{ | |
public function onBootstrap(MvcEvent $event) |
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
use 'strict'; | |
/** | |
* workaround for: https://github.com/angular/angular.js/issues/1460 | |
* source: http://victorblog.com/2014/01/12/fixing-autocomplete-autofill-on-angularjs-form-submit/ | |
* decoration tips: http://angular-tips.com/blog/2013/09/experiment-decorating-directives/ | |
* credits: https://github.com/evictor | |
* | |
* note: this directive only fixes the behaviour on form submit event, | |
* it doesn't fix the bidirectional data binding |
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 | |
/** | |
* archive list join clause | |
*/ | |
function myArchiveJoin($join) | |
{ | |
global $wpdb; | |
$join .= " |
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 | |
$serviceManager = $serviceLocator instanceof AbstractPluginManager ? | |
$serviceLocator->getServiceLocator() : $serviceLocator; |
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 | |
return [ | |
'factories' => [ | |
'Db' => function ($sm) { | |
$dbConfig = $sm->get('db_config'); | |
$db = new PDO( | |
$dbConfig['dsn'], | |
$dbConfig['user'], |
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 | |
include '../zf2/vendor/autoload.php'; | |
$array = include 'config.php'; // ZendSkeletonApp merged configuration | |
$array2 = include 'config2.php'; // zf-apigility-skeleton merged configuration | |
$array3 = include 'config3.php'; // zf-apigility-skeleton merged configuration with a traversable | |
$cycle = isset($argv[1]) ? $argv[1] : 1000; | |
echo 'cycling '.$cycle.' times' . PHP_EOL; |
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 | |
use Zend\Form\Fieldset; | |
use Zend\Form\Form; | |
use Zend\Form\View\Helper\Form as FormHelper; | |
use Zend\Form\View\HelperConfig; | |
use Zend\Stdlib\ArrayUtils; | |
use Zend\Stdlib\Hydrator\ObjectProperty; | |
use Zend\View\Renderer\PhpRenderer; |
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 | |
use Zend\Filter\FilterChain; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class FormFactory implements FactoryInterface | |
{ | |
public function createService(ServiceLocatorInterface $serviceLocator) | |
{ | |
$form = new Form(); |
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 | |
/** | |
* @author Stefano Torresi (http://stefanotorresi.it) | |
* @license See the file LICENSE.txt for copying permission. | |
* ************************************************ | |
*/ | |
namespace MySlideshow; | |
use MyBase\Entity\Entity; |