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
version: '3' | |
services: | |
# http://php.net/manual/ja/features.commandline.webserver.php | |
web: | |
image: php | |
command: php -S 0.0.0.0:8000 router.php | |
ports: | |
- '8000:8000' | |
working_dir: /web |
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 ArrayUtils; | |
/** | |
* deep get | |
* | |
* @param array $array | |
* @param string|int ...$keys | |
* |
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
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'aws-sdk-support', '~> 1' | |
end | |
sts = Aws::STS::Client.new | |
pp sts.get_caller_identity |
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
ARG php_version="latest" | |
FROM php:${php_version} | |
ARG man_lang="en" | |
ADD https://psysh.org/psysh /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/psysh | |
ENV HOME /root | |
ENV DOC_PATH $HOME/.local/share/psysh/ |
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
FROM amazonlinux:2 | |
RUN yum -y install yum-plugin-fastestmirror \ | |
&& yum -y update \ | |
; | |
RUN amazon-linux-extras install -y ruby2.4 | |
CMD tail -f /dev/null |
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
FROM amazonlinux:1 | |
RUN yum -y install yum-plugin-fastestmirror \ | |
&& yum -y update \ | |
; | |
RUN yum -y install ruby24 | |
CMD tail -f /dev/null |
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
FROM php:alpine | |
RUN wget https://git.io/psysh \ | |
&& chmod +x psysh \ | |
; | |
CMD ./psysh |
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 | |
/** | |
* @see http://blog.kevingomez.fr/2016/02/26/efficiently-creating-data-chunks-in-php/ | |
* | |
* @param Iterator $iterable | |
* @param int $size > 0 | |
* | |
* @return Generator {int => Generator} | |
*/ |
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 -x | |
# set -x | |
export AWS_DEFAULT_REGION=us-east-1 | |
lang=en | |
account_id=$(aws sts get-caller-identity | jq -r '.Account') | |
aws support describe-trusted-advisor-checks \ | |
--language $lang \ |
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
CP := cp -p | |
CONFIG_FILES := $(wildcard conf.d/*.conf) | |
SSH_DIR := $(HOME)/.ssh | |
define USAGE | |
Usage: | |
it make ~/.ssh/{config, keylist.txt} | |
usage show this | |
help same as usage | |
update git update |
NewerOlder