Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 app\clFilesystem; | |
use React\MySQL\Factory; | |
require __DIR__ . '/vendor/autoload.php'; | |
$loop = React\EventLoop\Factory::create(); | |
$filesystem = \React\Filesystem\Filesystem::create($loop); | |
$file = "teste.txt"; |
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
function main(): PromiseInterface { | |
return $this->query(1); | |
} | |
function query(page): PromiseInterface { | |
return $this | |
->makeAQuery(page) | |
->then($result) { |
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
$promise = new React\Promise\FulfilledPromise(1); | |
$transformer = new ThroughStream(function ($data) { | |
return array('id' => $data['id'], 'stocknummer' => $data['id'], 'dealer_id' => $data['id'], '_vnr' => 1, '_checksum' => sha1(json_encode($data)), '_timestamp' => date('Y-m-d h:i:s')); | |
}); | |
//try to change in Client class add _vnr, _checksum and _timestamp | |
$source->pipe($transformer)->pipe($stream); | |
//$source->pipe($stream); |
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
C:\Users\lappy>ipconfig /all | |
Windows IP Configuration | |
Host Name . . . . . . . . . . . . : lappy-PC | |
Primary Dns Suffix . . . . . . . : | |
Node Type . . . . . . . . . . . . : Hybrid | |
IP Routing Enabled. . . . . . . . : No | |
WINS Proxy Enabled. . . . . . . . : No |
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
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
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 | |
$loop = React\EventLoop\Factory::create(); | |
$logger = new \Zend\Log\Logger(); | |
$writer = new \Zend\Log\Writer\Syslog(array('application' => 'movim')); | |
$logger->addWriter($writer); | |
$connector = new Ratchet\Client\Factory($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
$buffer = ''; | |
$conn->on('data', function($data, $conn) use (&$buffer) { | |
$buffer .= $data; | |
// check to see if the buffer contains any line feeds (detect end of line) | |
while (false !== ($pos = strpos($buffer, PHP_EOL))) { | |
// get the first line from the buffer (up to the EOL) | |
$line = substr($buffer, 0, $pos); | |
// remove the line from the buffer (advance behind the EOL) |