Skip to content

Instantly share code, notes, and snippets.

View il-m-yamagishi's full-sized avatar

Masaru Yamagishi il-m-yamagishi

View GitHub Profile
@il-m-yamagishi
il-m-yamagishi / phpcon2022-lt.php
Last active September 23, 2022 07:49
PHP Conference Japan 2022 LT 資料
<?php
/**
* @copyright 2022 Masaru Yamagishi
* @license CC-BY-4.0
* @link https://fortee.jp/phpcon-2022/proposal/51f66d0e-5bae-4902-bb63-89700407204a
* @link https://docs.google.com/presentation/d/11NCgOhSF3ZB1Kea8VD4TW9qghQjxSZwm4-IOIP2x-aQ/edit#slide=id.p
*/
declare(strict_types=1);
@il-m-yamagishi
il-m-yamagishi / WebCodecs.d.ts
Created April 3, 2022 14:12
WebCodecs.d.ts
// typed and descripted by MDN https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder
/**
* An object containing the following members:
*/
interface EncodedAudioChunkInit {
/**
* Indicates if the chunk is a key chunk that does not rely on other frames for encoding.
*/
readonly type: 'key' | 'delta';
FROM debian:buster
# @link https://github.com/nodejs/docker-node/blob/fdf244039755aead02405a0c27336f225d402d1f/15/buster/Dockerfile
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NODE_VERSION 15.7.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
@il-m-yamagishi
il-m-yamagishi / MainScene.ts
Last active June 20, 2021 07:27
babylon-fps-shooter
import { BoxBuilder } from '@babylonjs/core/Meshes/Builders/boxBuilder'
import { Camera } from '@babylonjs/core/Cameras/camera'
import { CapsuleBuilder } from '@babylonjs/core/Meshes/Builders/capsuleBuilder'
import { CascadedShadowGenerator } from '@babylonjs/core/Lights/Shadows/cascadedShadowGenerator'
import { Color3 } from '@babylonjs/core/Maths/math.color'
import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture'
import { DirectionalLight } from '@babylonjs/core/Lights/directionalLight'
import { Engine } from '@babylonjs/core/Engines/engine'
import { EngineOptions } from '@babylonjs/core/Engines/thinEngine'
import { FreeCamera } from '@babylonjs/core/Cameras/freeCamera'
{
"paddingVertical": "21px",
"paddingHorizontal": "48px",
"marginVertical": "45px",
"marginHorizontal": "45px",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"backgroundColor": "rgba(31,129,109,0)",
"dropShadow": true,
@il-m-yamagishi
il-m-yamagishi / DDDConstructor.php
Created July 29, 2019 00:39
DDD with PHP Constructor speed test
<?php declare(strict_types = 1);
interface HasIdentifier
{
public function getId(): int;
}
interface HasName
{
public function getName(): string;
export interface JeelizFaceFilterInitVideoSettings {
videoElement?: HTMLVideoElement;
deviceId?: string;
facingMode?: string;
idealWidth?: number;
idealHeight?: number;
minWidth?: number;
maxWidth?: number;
minHeight?: number;
maxHeight?: number;
@il-m-yamagishi
il-m-yamagishi / gist:be55a24fde65ed3043c1e4ae143038bd
Last active April 8, 2019 00:42
docker amazon linux 2 php DateTimeZone
================================
=== amazonlinux:2.0.20190228 ===
================================
$ docker run --rm -it amazonlinux:2.0.20190228 /bin/bash -c "set -x; date && TZ=Asia/Tokyo date"
+ date
Mon Apr 8 00:32:09 UTC 2019
+ TZ=Asia/Tokyo
+ date
Mon Apr 8 09:32:09 JST 2019
@il-m-yamagishi
il-m-yamagishi / gce-operator.js
Created December 6, 2017 07:39
Google Compute Engine Operator
/**
* Slack Outgoing Webhook を利用して Google Compute Engine を操作するスクリプトです。
*
* Google Cloud Functions で利用されることを想定しています。
*
* @author Masaru Yamagishi <m-yamagishi@infiniteloop.co.jp>
* @copyright MIT
*/
const TOKEN = 'xxxxx' // Slack Outgoing Webhook Token
@il-m-yamagishi
il-m-yamagishi / knowledge-edit.html
Created October 11, 2016 02:00
Knowledge Edit Page Modification Request
<div class="container" id="content_top">
<form action="/protect.knowledge/update" method="post" role="form" id="knowledgeForm" enctype="multipart/form-data">
<div class="form-inline">
<!-- info -->
<div class="form-group">
<p class="form-control-static">Knowledgeを更新 : <i class="fa fa-key"></i>&nbsp;2892 / <i class="fa fa-calendar"></i>&nbsp;2016/10/11 9:29</p>
</div>
</div>