Skip to content

Instantly share code, notes, and snippets.


Akihito Koriyama koriym

View GitHub Profile
View alps3min.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Ontology -->
<descriptor id="name" />
<!-- Taxonomy -->
koriym /
Last active Jun 11, 2022
なぜ PageリソースとAppリソースがあるのか

なぜ PageリソースとAppリソースがあるのか




koriym / suppress_deprecated.php
Created Nov 14, 2021
Suppress E_DEPRECATED in vendor files
View suppress_deprecated.php
if (PHP_VERSION_ID >= 80100) {
set_error_handler(static function (int $errno, string $errstr, string $errfile) {
return $errno === E_DEPRECATED && str_contains($errfile, dirname(__DIR__) . '/vendor');
koriym / ruleset_xml_schema.xsd
Created May 5, 2021 — forked from addiks/ruleset_xml_schema.xsd
New ruleset_xml_schema.xsd
View ruleset_xml_schema.xsd
<?xml version="1.0"?>
<xs:element name="ruleset">
koriym / NotPreladerdFinder.php
Created Mar 10, 2021
Loader to find classes that have not been preloaded
View NotPreladerdFinder.php
// preloadされていないクラスを見つけるローダー
$notPreloaded = new ArrayObject();
spl_autoload_register(function (string $class) use ($notPreloaded) {
$notPreloaded[] = $class;
koriym /
Last active Feb 10, 2021
'pcre2.h' file not found on Mac Big Sur with PHP 8?
/opt/homebrew/Cellar/php/8.0.2/include/php/ext/pcre/php_pcre.h:23:10: fatal error: 
      'pcre2.h' file not found
#include "pcre2.h"
1 error generated.

To fix this issue, Symlink pcre2.h manually.

koriym / meida_query.php
Last active Jan 31, 2021
Minimum repository pattern with AOP
View meida_query.php
// The next Rqy.Query
namespace Ray\Query\Fake\Media;
use Ray\Query\Annotation\Sql;
interface RegisterUserInterface
koriym /
Last active Nov 21, 2020
Brew install log on arm Mac


akihito@kumaair(arm64) ~ % /opt/homebrew/bin/brew install php
Warning: You are running macOS on a arm64 CPU architecture.
We do not provide support for this (yet).
Reinstall Homebrew under Rosetta 2 until we support it.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
koriym /
Last active Nov 4, 2020
PHP spaceship operator example
usort($descriptors, function (AbstractDescriptor $a, AbstractDescriptor $b): int {
    $order = ['semantic' => 0, 'safe' => 1, 'unsafe' => 2, 'idempotent' => 3];
    return $order[$a->type] <=> $order[$b->type]; // sort by type
koriym / How I explained REST to my wife...
Created Jul 9, 2020
How I explained REST to my wife...
View How I explained REST to my wife...
Wife: Who is Roy Fielding?
Ryan: Some guy. He's smart.
Wife: Oh. What did he do?
Ryan: He helped write the first web servers and then did a ton of research explaining why the web works the way it does. Oh yea, his name is on the specification for the protocol that is used to get pages from servers to your browser.
Wife: How does it work?