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 React\SocketClient; | |
use React\SocketClient\ConnectorInterface; | |
use React\EventLoop\LoopInterface; | |
use React\Promise\Timer; | |
class TimeoutConnector implements ConnectorInterface | |
{ |
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 | |
# | |
# 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 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 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
sudo apt-get install rubygems | |
sudo gem install fpm | |
sudo apt-get install wget | |
wget http://lueck.tv/psocksd/psocksd.phar | |
chmod 755 psocksd.phar | |
fpm -s dir -t deb -n psocksd -v 0.3.1 -a all -d 'php5-cli > 5.3' --license MIT ./psocksd.phar=/usr/bin/psocksd | |
dpkg -c psocksd_0.3.1_all.deb | |
sudo dpkg -i psocksd_0.3.1_all.deb |
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
Action:ping | |
Response: Success | |
Ping: Pong | |
Timestamp: 1403277378.612099 |
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
Action: pong | |
Response: Error | |
Message: Invalid/unknown command: pong. Use Action: ListCommands to show available commands. |
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
# active call from 50 -> 49 | |
Action: CoreShowChannels | |
Response: Success | |
EventList: start | |
Message: Channels will follow | |
Event: CoreShowChannel | |
Channel: SIP/49-1-00000011 |
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
Action: command | |
Command: sip show peers | |
Response: Follows | |
Privilege: Command | |
Name/username Host Dyn Forcerport ACL Port Status Description | |
100 (Unspecified) D a 0 UNKNOWN | |
111 (Unspecified) D a 0 UNKNOWN | |
1111 (Unspecified) D a 0 Unmonitored | |
114 (Unspecified) D a 0 UNKNOWN |
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 | |
use React\SocketClient\Connector; | |
use React\SocketClient\SecureConnector; | |
use React\Socket\Server; | |
use React\Stream\Stream; | |
require __DIR__ . '/../vendor/autoload.php'; | |
$loop = React\EventLoop\Factory::create(); |
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 | |
class EnterpriseApi extends Clue\React\Soap\Proxy | |
{ | |
public function __call($method, $args) | |
{ | |
if (!in_array($method, array('DoAuthenticateUserWithPlaintextPassword', 'BypassTheAuthenticationFramework', 'debug'))) { | |
$d = new React\Promise\Deferred(); | |
$d->reject(new \Exception('This is an enterprise API!!11')); | |
return $d->promise(); |