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
# Stuff up here | |
frontend incoming | |
acl secure dst_port 443 | |
acl foo_host hdr(host) -i foo.com | |
redirect scheme https if foo_host !secure | |
# Stuff down here |
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
import os | |
import sys | |
sys.path.append(os.path.join(os.path.dirname(__file__), 'vendor')) | |
from tornado.wsgi import WSGIContainer | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from assurance import frontend | |
def runserver(): |
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 Core\Http; | |
use Symfony\Component\HttpFoundation\Request as SymfonyRequest; | |
use Symfony\Component\HttpFoundation\ParameterBag; | |
class Request extends SymfonyRequest | |
{ | |
/** |
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 | |
$file = new Core\File\RemoteFile('http://bestclipartblog.com/clipart-pics/food-clip-art-6.png'); | |
// Check if exists: | |
var_dump($file->exists());// bool(true) | |
// Get HTTP Status Code | |
var_dump($file->getHttpStatus()); // int(200) |
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 Core\Database; | |
use Logger; | |
use mysqli; | |
use Psr\Log\LoggerInterface; | |
/** | |
* Class MySQLiProxy |
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 Currency { | |
private $value = 0; | |
public function setValue($value) | |
{ | |
$this->value = $value; | |
} | |
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 | |
function is_pjax() | |
{ | |
return array_key_exists('HTTP_X_PJAX', $_SERVER) || array_key_exists('_pjax', $_GET); | |
} |
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 ArrayAccess; | |
use Countable; | |
use IteratorAggregate; | |
class DataContainer implements ArrayAccess, Countable, IteratorAggregate | |
{ | |
use DataContainerTrait; | |
} |
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 Core\Responder; | |
class JsonResponder extends Responder | |
{ | |
/** | |
* @return \Orno\Http\Response | |
*/ | |
protected function respond() |
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 | |
function require_in_context($__path, array $__context) | |
{ | |
extract($__context, EXTR_SKIP); | |
unset($__context); | |
ob_start(); | |
require $__path; |