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
## install openssl 1.0.2t | |
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/ | |
git checkout 8b9d6d688f483a0f33fcfc93d433de501b9c3513 -- openssl.rb | |
brew install openssl | |
## build php: "/usr/local/Cellar/icu4c/64.2" is a specific icu4c version. | |
LDFLAGS=-L/usr/local/Cellar/icu4c/64.2 \ | |
CONFIGURE_OPTS="--with-pear --with-openssl=/usr/local/Cellar/openssl/1.0.2t --with-icu-dir=/usr/local/Cellar/icu4c/64.2" \ | |
phpenv install 5.6.40 |
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
docker run --rm -v "$(pwd)":/app -w /app --entrypoint /rector/bin/rector rector/rector process src --dry-run |
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 php | |
<?php | |
/** | |
* composer init && composer require cakephp/utility:^3.8 | |
* | |
* Try < PHP 5.6: ./genuuid4.php 65536 | sort | uniq -d | |
*/ | |
require 'vendor/autoload.php'; | |
use Cake\Utility\Text; |
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 | |
/** | |
* | |
* Copyright 2018 ELASTIC Consultants Inc. | |
* | |
*/ | |
namespace Helper\MobileEmulation; | |
use Codeception\Module; |
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 | |
// in bootstrap_cli.php | |
if (PHP_SAPI === 'cli' && Configure::read('debug')) { | |
// Bake書き換え | |
EventManager::instance()->on('Bake.beforeRender', static function (Event $event) { | |
$view = $event->getSubject(); | |
/* @var $view View */ | |
// for Bake Entity | |
if ($view->get('propertySchema') && $view->get('table') && $view->get('name')) { | |
// propertySchemaを書き換えてスキーマコメントを付与する |
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 | |
/** | |
* Copyright 2018 Takashi Nojima. | |
*/ | |
namespace App\Routing; | |
use Cake\Controller\Controller; | |
use Cake\Http\ControllerFactory; | |
use Cake\Http\Response; |
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 find /var/spool/postfix/deferred/ -type f -exec grep -l 'search body test' '{}' \; | xargs -n1 basename | xargs -n1 sudo postsuper -h |
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 hash_get(key, haystack) { | |
const keys = key.split('.'); | |
if (!Object.prototype.hasOwnProperty.call(haystack, keys[0])) { | |
return null; | |
} | |
const matched = haystack[keys[0]]; | |
if (keys.length === 1) { | |
return matched; | |
} |
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 App\TestSuite\Fixture; | |
use Cake\Datasource\ConnectionInterface; | |
use Cake\TestSuite\Fixture\TestFixture; | |
/** | |
* ChunkInsertTestFixture | |
*/ | |
abstract class ChunkInsertTestFixture extends TestFixture |
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
(...snip...) | |
- vendor/bin/phpunit --coverage-text --colors=never --exclude-group=external | |
except: | |
variables: | |
- $CI_COMMIT_MESSAGE =~ /(?:^WIP:)|@WIP/i |