This file contains 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 | |
echo '<ul>'; | |
if ($handle = opendir('.')) { | |
while (false !== ($file = readdir($handle))) { | |
if (in_array($file, array('.', '..'))) { | |
continue; | |
} | |
echo '<li><a href="'.$file.'">'.$file.'</a></li>'; | |
} | |
closedir($handle); |
This file contains 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 | |
header('Content-Type: application/json'); | |
echo json_encode( | |
[ | |
'opcache' => opcache_get_status(), | |
'realpath_cache_size' => [ | |
'configured' => ini_get('realpath_cache_size'), | |
'real' => realpath_cache_size(), | |
] | |
], |
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo echo "deb http://httpredir.debian.org/debian jessie-backports main contrib non-free" > /etc/apt/sources.list.d/jessie-backports.list | |
sudo apt-get update | |
sudo apt-get -t jessie-backports install ansible -y | |
ansible-playbook /vagrant/playbook.yml | |
SHELL | |
end |

This file contains 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 | |
/** | |
* A custom type type for datetime(3) in MySQL. | |
* | |
* @see http://www.doctrine-project.org/jira/browse/DBAL-1084 | |
*/ | |
namespace My\Project\DBAL\Types; | |
use Doctrine\DBAL\Types\ConversionException; | |
use Doctrine\DBAL\Platforms\AbstractPlatform; |
This file contains 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 | |
/** | |
* Create a PULL socket to receive print requests from the webserver. | |
* Create a PUB socket to send print requests to the windows laptop. | |
*/ | |
$context = new ZMQContext(); | |
$pub = $context->getSocket(ZMQ::SOCKET_PUB); | |
$pub->bind('tcp://*:5566'); | |
$pull = $context->getSocket(ZMQ::SOCKET_PULL); | |
$pull->bind('tcp://*:5567'); |
This file contains 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 | |
$sql = new \Zend\Db\Sql\Sql($db, 'user'); | |
$query = $sql->update(); | |
$query->set(array('_update' => date('Y-m-d H:i:s'))); | |
$query->where(array('userID' => 1)); | |
$stmt = $sql->prepareStatementForSqlObject($query); | |
$stmt->execute(array('userID' => 1)); |
This file contains 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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure --prefix=/usr/local/Cellar/php54-memcached/2.0.1 --with-php-config=/usr/local/Cellar/php54/5.4.9/bin/php-config --with-libmemcached-dir=/usr/local/Cellar/libmemcached/1.0.14 | |
## --------- ## | |
## Platform. ## |
This file contains 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
/** | |
* Specific example for Zend Framework 1.0 applications (update the database "fetching") | |
*/ | |
class DatabaseTest extends PHPUnit_Extensions_MultipleDatabase_TestCase | |
{ | |
protected function getDatabaseConfigs() | |
{ | |
$configs = array(); | |
$options = $this->_application->getOptions(); | |
$databases = $options['resources']['dbs']; |
This file contains 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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.69. Invocation command line was | |
$ ./configure --prefix=/usr/local/Cellar/php53-gearman/HEAD --with-gearman=/usr/local/Cellar/gearman/0.33 | |
## --------- ## | |
## Platform. ## |