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 Seedstream; | |
use React\EventLoop\LoopInterface, | |
React\Socket\ConnectionInterface; | |
class HandlerManager | |
{ | |
private $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
<?php | |
namespace Seedstream; | |
use React\EventLoop\LoopInterface, | |
React\Socket\ConnectionInterface; | |
class Pusher | |
{ | |
private $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
<?php | |
class QueryLevel implements \ArrayAccess, \Iterator, \Countable | |
{ | |
private $elements = []; | |
private $iterationValid; | |
private function encodeElement($name, $value, $nameFormat = '%s') | |
{ |
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 | |
// Because PHP_URL_* constants are sequential :-( | |
const URL_SCHEME = 0x01; | |
const URL_USER = 0x02; | |
const URL_PASS = 0x04; | |
const URL_HOST = 0x08; | |
const URL_PORT = 0x10; | |
const URL_PATH = 0x20; | |
const URL_QUERY = 0x40; |
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 | |
$pidFile = __DIR__ . '/push-notify.pid'; | |
$localSockAddr = __DIR__ . '/push-notify.sock'; // used for sending updates | |
$publicSockAddr = 'tcp://0.0.0.0:1337'; // bind address for push clients | |
$remoteSockAddr = 'tcp://127.0.0.1:1337'; // push client remote address for 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
(function(){"use strict";var e="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/ICA_flag.svg/220px-ICA_flag.svg.png",t="http://freegeoip.net/json/?callback=window.____PeskyRuskies____.jsonpCallback",n="RU",r=false,i=null;window.____PeskyRuskies____={init:function(){var e=this,t=function(){e.initJsonpRequest()},n=function(){if(!r){try{document.documentElement.doScroll("left")}catch(t){setTimeout(n,1);return}e.initJsonpRequest()}};if(document.readyState==="complete"){this.initJsonpRequest()}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",t,false);document.addEventListener("load",t,false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",t);document.attachEvent("onload",t);try{if(document.documentElement.doScroll&&window.frameElement===null){n()}}catch(i){}}},initJsonpRequest:function(){if(!r){i=document.createElement("script");i.type="text/javascript";i.src=t;document.body.appendChild(i);r=true}},jsonpCallback:function(t){if(i){if(t.country_code!==u |
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 | |
/** | |
* Represents a MIME content type | |
* | |
* @author Chris Wright <github@daverandom.com> | |
*/ | |
class ContentType | |
{ | |
/** |
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 | |
function build_url($parts) | |
{ | |
$result = ''; | |
if (isset($parts['scheme'])) { | |
$result .= $parts['scheme'] . ':'; | |
} |
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
Option Compare Database | |
Option Explicit | |
Private Type Point | |
x As Long | |
y As Long | |
End Type | |
Private Type Position | |
left As Long |
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
/*jslint browser: true, plusplus: true, regexp: true, white: true */ | |
/** | |
* Prototype for object which randomly displays a list of images with fading transitions | |
* | |
* @package ImageRandomizer <https://gist.github.com/DaveRandom/5899497> | |
* @author Chris Wright <https://github.com/DaveRandom> | |
* @copyright Copyright (c) Chris Wright <https://github.com/DaveRandom> | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License | |
* @version 1.0.127 |