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
#!/bin/bash | |
DOCKER_IMAGE=42milez/hanami:latest | |
DOCKER_WORK_DIR=/root | |
PROJECT_DIR=$(pwd) | |
DATABASE=postgres | |
docker run \ | |
-w ${DOCKER_WORK_DIR} \ |
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
import boto3 | |
import collections | |
import logging | |
import time | |
ec2 = boto3.client('ec2') | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) |
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 bash | |
# https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/enhanced-networking-ena.html | |
amzn_driver_ver="1.5.3" | |
centos_ver=`sed -e 's/^CentOS\s\(Linux\s\|\)release\s\([0-9.]\+\)\s.\+$/\2/' /etc/centos-release` | |
# Install the appropriate kernel-devel and kernel-headers | |
# -------------------------------------------------- | |
yum install -y perl |
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 bash | |
# https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/enhanced-networking-ena.html | |
amzn_driver_ver="1.5.3" | |
# Install the appropriate kernel-devel and kernel-headers | |
# -------------------------------------------------- | |
yum install -y kernel-headers-$(uname -r) kernel-devel-$(uname -r) |
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 bash | |
url_prefix='https://github.com/USER_NAME/REPOSITORY_NAME/pull/' | |
src_branch='branch-a' | |
dest_branch='branch-b' | |
pull_requests=() | |
# 1. Find the commit hashes which are only included in dest_branch. |
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 | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 本ファイルにはハッシュを扱うユーティリティクラスの定義が含まれます。 | |
* | |
*/ | |
class Util_Hash { |
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 | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 本ファイルは User テーブル用のマイグレーションスクリプトです。 | |
* | |
*/ | |
namespace Fuel\Migrations; |
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 | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 本ファイルには User テーブルに対応するモデルの定義が含まれます。 | |
* | |
*/ | |
class Model_User extends \Orm\Model { |
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 | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 本ファイルにはユーザー登録に関するアクションを扱うコントローラの定義が含まれます。 | |
* | |
*/ | |
use Fuel\Core\Security as Security; |
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 | |
/* Aug. 21, 2015 - Akihiro TAKASE | |
* | |
* 以下は Standard PHP Library の ArrayIterator を利用したサンプルコードです。 | |
* Employee オブジェクトの配列が Department オブジェクトのプライベートプロパティとなっています。 | |
* 本サンプルでは当該配列を ArrayIterator を利用して走査します。 | |
* | |
*/ |