Skip to content

Instantly share code, notes, and snippets.

View terukizm's full-sized avatar

KOIZUMI teruaki terukizm

View GitHub Profile
@terukizm
terukizm / deploy_bad.php
Last active July 13, 2018 08:12
Deployerのrsyncレシピでexcludeとincludeの同時指定を行う ref: https://qiita.com/terukizm/items/9c9cf7752df0cb3ae946
<?php
require 'recipe/rsync.php'
// (略)
// Rsync Settings
set('rsync_src', __DIR__);
set('rsync_dest', '{{ release_path }}');
set('rsync',[
'include' => ['public'],
@terukizm
terukizm / docker-compose.yml
Last active May 9, 2018 07:10
docker-composeでMinio起動時にデフォルトのbucketを作成する ref: https://qiita.com/terukizm/items/6850aa316de425e3e3b4
minio:
image: minio/minio:latest
(略)
entrypoint: sh
command: -c "
mkdir -p /data/mybucket;
mkdir -p /data/.minio.sys/buckets/mybucket;
cp /policy.json /data/.minio.sys/buckets/mybucket/policy.json;
/usr/bin/minio server /export;
"
@terukizm
terukizm / JSON
Last active April 15, 2018 10:15
Step by StepでBlue/Greenデプロイ(by AWS CodeDeploy) ref: https://qiita.com/terukizm/items/8bd5d9be61a150d815f3
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codedeploy:RegisterApplicationRevision",
"codedeploy:GetApplicationRevision"
],
"Resource": [
@terukizm
terukizm / file1.txt
Last active April 15, 2018 09:54
AWS CodeDeployで公式サンプルを動かす(入門者向け・WebUIベース・インプレースデプロイ) ref: https://qiita.com/terukizm/items/e2c1400d129042868731
$ aws s3 cp s3://aws-codedeploy-ap-northeast-1/latest/install . --region ap-northeast-1
download: s3://aws-codedeploy-ap-northeast-1/latest/install to ./install
$ chmod +x ./install
$ sudo ./install auto
I, [2018-04-13T08:45:57.432536 #2692] INFO -- : Starting Ruby version check.
(略)
完了しました!
I, [2018-04-13T08:45:59.421154 #2692] INFO -- : Update check complete.
I, [2018-04-13T08:45:59.421229 #2692] INFO -- : Stopping updater.
@terukizm
terukizm / default.conf
Last active April 7, 2018 09:36
ファイルアップロード時にnginxで発生する413 Request Entity Too LargeをWebApp側でハンドリング ref: https://qiita.com/terukizm/items/d82f2972af8dc6b1d022
server {
index index.php index.html;
client_max_body_size 100M;
location / {
error_page 413 @413;
try_files $uri $uri/ /index.php?$query_string;
}
# (e.g.) laravel settings
@terukizm
terukizm / config.yml
Last active January 11, 2018 02:52
Embulk + Elasticsearch + kibana + OpenStreetMapでお手軽に地理情報を可視化 ref: https://qiita.com/terukizm/items/46b531b7fcc7a5f6f436
in:
type: file
path_prefix: ./aedinfo_tokyo.json
parser:
charset: UTF-8
newline: LF
type: jsonpath
columns:
- {name: Id, type: long}
- {name: LocationName, type: string}
@terukizm
terukizm / file0.txt
Created July 7, 2017 07:21
Selenium Python Bindingsでブラウザの言語を指定してシークレットモードでページを開く(Chrome) ref: http://qiita.com/terukizm/items/ac17dfd3703402e8b658
$ pip install selenium
$ brew install chromedriver
@terukizm
terukizm / file0.txt
Last active June 30, 2017 02:32
Kubernetesドリブンの機械学習プラットフォーム「Seldon」を触ってみる ref: http://qiita.com/terukizm/items/3adff5242c70a4500922
c:\>minikube start --vm-driver="hyperv" --memory=12000 --disk-size=40g
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Downloading Minikube ISO
90.95 MB / 90.95 MB [==============================================] 100.00% 0s
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
@terukizm
terukizm / file0.txt
Last active June 30, 2017 01:53
MinikubeをWindows 10(Hyper-V)で利用する ref: http://qiita.com/terukizm/items/bf8e4744fcb8ba494fc8
c:\>minikube start --vm-driver="hyperv"
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
@terukizm
terukizm / file0.txt
Last active November 28, 2016 13:52
Pythonの汎用データバリデーションライブラリ「Cerberus」を使う ref: http://qiita.com/terukizm/items/db8a70158e94525c69d5
$ pip install cerberus