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
var EventStream = require('event-stream'), | |
i = 0; | |
process.stdin | |
.pipe(EventStream.map(function (req, cb) { | |
if (i++ % 2 === 0) { | |
setTimeout(function () { | |
cb(null, "" + req); | |
}, 5000); |
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 | |
class Skrz_Sniffs_Classes_ClassDeclarationSniff implements PHP_CodeSniffer_Sniff | |
{ | |
public function register() | |
{ | |
return [T_CLASS, T_INTERFACE, T_TRAIT]; | |
} |
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 Example; | |
use Bunny\Channel; | |
use Bunny\Client; | |
use Bunny\Message; | |
use React\Promise\Deferred; | |
use React\Promise\PromiseInterface; | |
require_once __DIR__ . "/vendor/autoload.php"; |
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 Bunny\Example; | |
use Bunny\Async\Client; | |
use Bunny\Channel; | |
use React\EventLoop\Factory; | |
$loop = Factory::create(); | |
$c = new Client($loop, [ |
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 | |
$q = [ | |
"query" => ["filtered" => [ | |
"filter" => ["range" => [ | |
"created" => ["gte" => "-31 days"], | |
]], | |
]], | |
"aggs" => [ | |
"by_date" => ["date_histogram" => [ |
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
server { | |
# ... | |
location / { | |
set $utm_hash ""; | |
if ($args ~* "^(.*&?)utm_source=([a-zA-Z0-9._-]*)(&(.*))?") { | |
set $args $1$4; | |
set $utm_hash "$utm_hash&utm_source=$2"; | |
} |
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
SkrzORM | Time: 0.305 s | Memory: 10.7 MB | PHP: 5.5.10 | |
NDB 2.0 | Time: 3.072 s | Memory: 14.0 MB | PHP: 5.5.10 | Nette: 2.0.14 | |
NDB 2.1 | Time: 0.442 s | Memory: 13.7 MB | PHP: 5.5.10 | Nette: 2.1.2 | |
NDB 2.2 | Time: 0.447 s | Memory: 13.7 MB | PHP: 5.5.10 | Nette: 2.2.x | |
Nextras\Orm | Time: 0.507 s | Memory: 19.5 MB | PHP: 5.5.10 | |
NotOrm | Time: 0.900 s | Memory: 7.2 MB | PHP: 5.5.10 | |
LeanMapper | Time: 0.393 s | Memory: 15.7 MB | PHP: 5.5.10 | |
Doctrine2 | Time: 15.213 s | Memory: 32.4 MB | PHP: 5.5.10 | Doctrine: 2.4.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
package cz.cvut.atg.zui.astar; | |
import eu.superhub.wp5.graphcommon.graph.Graph; | |
import eu.superhub.wp5.planner.planningstructure.GraphEdge; | |
import eu.superhub.wp5.planner.planningstructure.GraphNode; | |
import junit.framework.Assert; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Parameterized; |
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
#lang scheme | |
(require rackunit) | |
(require rackunit/text-ui) | |
(define minimal-maze | |
'( | |
(w w w) | |
(w 0 w) | |
(w w w) |
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
console.log("hello, world!"); |