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 GMO\Common\Web\Twig; | |
use GMO\Common\Collections\ArrayCollection; | |
use Symfony\Component\HttpFoundation\Response; | |
class TwigResponse extends Response { | |
public function setTemplate($template) { | |
$this->template = $template; |
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 | |
if (!isResource()) { | |
return false; | |
} | |
require_once __DIR__ . '/index.php'; | |
function isResource() { | |
$path = $_SERVER['SCRIPT_NAME']; |
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 Service\Translation; | |
use Common\Config; | |
use Common\Log; | |
use GMO\Common\Collections\ArrayCollection; | |
use GMO\Common\String; | |
use Pimple; | |
use Symfony\Component\Finder\Finder; | |
use Symfony\Component\Translation\Translator as BaseTranslator; |
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 GMO\Common; | |
class Http { | |
/** | |
* A list of HTTP headers to choose the original client IP address from. In | |
* addition to these the RemoteAddr (REMOTE_ADDR) is also used as a final | |
* fallback. | |
*/ |
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 Log; | |
use Common\Config; | |
use GMO\Cache\CacheKeys; | |
use GMO\Common\String; | |
use Log\Handler\LogstashHandler; | |
use Log\Processor\EnvProcessor; | |
use Log\Processor\RequestProcessor; | |
use Monolog\Handler\ChromePHPHandler; |
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 Sorien\Provider\PimpleDumpProvider; | |
use Symfony\Component\HttpFoundation\Request; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$app = new \Bolt\Application(); | |
$request = Request::create('/'); | |
Request::setFactory(function () use ($request) { |
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 Carbon\Carbon; | |
use Doctrine\DBAL\Platforms\AbstractPlatform; | |
use Doctrine\DBAL\Types\DateTimeType; | |
/** | |
* Updates DateTime objects to return Carbon instance | |
*/ | |
class CarbonType extends DateTimeType |
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 Bolt\Filesystem\Filesystem; | |
use Bolt\Filesystem\Local; | |
$fs = new Filesystem(new Local(__DIR__)); | |
foreach ($fs->find()->files() as $file) { | |
/** @var \Bolt\Filesystem\File $file */ | |
echo $file->getFilename() . '\n'; |
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
#!/usr/bin/env bash | |
# As root | |
# Make config and data dirs | |
mkdir /etc/composer -p || exit 1 | |
mkdir /var/lib/composer -p | |
# Set composer home dir to global location | |
cat << EOF > /etc/profile.d/composer.sh | |
#!/usr/bin/env bash |
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
#!/usr/bin/env bash | |
# Lists SSH public key fingerprints | |
file=$1 | |
hash="" | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
hash="-E MD5" | |
fi |
OlderNewer