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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { FormattedMessage } from 'react-intl'; | |
import { AutoComplete as MuiAutoComplete } from 'material-ui'; | |
class AutoComplete extends MuiAutoComplete { | |
/** | |
* Added callback param | |
*/ | |
close(cb?: () => any) { |
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
#!/usr/bin/env bash | |
function _symfony_complete { | |
local CMDLINE_CONTENTS="$COMP_LINE" | |
local CMDLINE_CURSOR_INDEX="$COMP_POINT" | |
local CMDLINE_WORDBREAKS="$COMP_WORDBREAKS"; | |
export CMDLINE_CONTENTS CMDLINE_CURSOR_INDEX CMDLINE_WORDBREAKS | |
local RESULT STATUS; |
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
// This doesn't have everything but it gives an idea of how the interfaces and decorator should be used. | |
interface LoginFormData { | |
username?: string; | |
password?: string; | |
} | |
interface LoginFormProps extends FormProps<LoginFormData, AppState> { | |
dispatch?: Dispatch<AppState>, | |
} |
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
#!/usr/bin/env bash | |
# Lists SSH public key fingerprints | |
file=$1 | |
hash="" | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
hash="-E MD5" | |
fi |
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
#!/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 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 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 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 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 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 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 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 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 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 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. | |
*/ |
NewerOlder