- Install & Setup
- Write a simple Router
- Zephir rewritten version
- Extension installation and testing
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
#!/bin/bash | |
_CONTENT=$(echo $1 | base64 --decode) | |
_FILENAME=`echo $2 | base64 --decode` | |
_CMD=`echo $3 | base64 --decode` | |
echo $_CONTENT > $_FILENAME | |
echo `$_CMD` |
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 | |
require __DIR__ . '/vendor/autoload.php'; | |
use React\EventLoop\Factory as EventLoopFactory; | |
use WyriHaximus\React\ChildProcess\Pool\Pool\Fixed as FixedPool; | |
use WyriHaximus\React\ChildProcess\Pool\ProcessCollection\ArrayList as ProcessCollectionArrayList; | |
use React\ChildProcess\Process; | |
$tasks = []; |
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 | |
require __DIR__ . '/vendor/autoload.php'; | |
use React\EventLoop\Factory as EventLoopFactory; | |
use WyriHaximus\React\ChildProcess\Pool\Pool\Fixed as FixedPool; | |
use WyriHaximus\React\ChildProcess\Pool\ProcessCollection\ArrayList as ProcessCollectionArrayList; | |
use React\ChildProcess\Process; | |
$tasks = []; |
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 | |
namespace Layout\View\Helper\Initializer; | |
use Layout\View\Helper\LandingHandler; | |
use Test\Framework\Environment\Stub\Mvc\Controller\PluginManager; | |
use Test\Framework\Environment\Stub\ServiceManager\ServiceManager; | |
use Test\Framework\TestCase\TestCase; | |
use Zend\Http\PhpEnvironment\Request; |
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 | |
namespace Layout\ServiceManager\AbstractFactory; | |
use Interop\Container\ContainerInterface; | |
use Zend\ServiceManager\AbstractFactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class Factory implements AbstractFactoryInterface | |
{ | |
const INJECTIONS = 'injections'; | |
const PARAMETERS = 'parameters'; | |
/** |
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 | |
// async php client | |
$request = ''; | |
$request .= "GET / HTTP/1.1\r\n"; | |
$request .= "Host: google.com\r\n"; | |
$request .= "Connection: Close\r\n\r\n"; | |
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); | |
socket_set_nonblock($socket); |
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
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
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
$ brew install ec2-api-tools | |
# -- add the following into $HOME/.bash_profile: | |
# export REGION='us-west-2' | |
# export EC2_KEYPAIR="$HOME/.ssh/ec2-$REGION.pem" | |
# export EC2_HOME="`brew --prefix ec2-api-tools`/jars" | |
# export EC2_URL="https://ec2.$REGION.amazonaws.com" | |
# export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)" | |
# export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)" |
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 | |
$landing = '/'; | |
$goal = '/metric?signup'; | |
$retention = '/metric?signin'; | |
$dir = __DIR__ . '/nginx'; | |
$full = __DIR__ . '/full.log'; | |
unlink($full); | |
for($i=0;$i<100;$i++) { |
NewerOlder